body { background: #f6f8fb; }
.card { border: 0; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.badge-status { font-size: .85rem; }

.app-main { max-width: 1560px; }
.app-navbar .navbar-brand { white-space: nowrap; }
.app-navbar .nav-link { white-space: nowrap; }
.app-navbar .dropdown-menu { border: 0; box-shadow: 0 8px 24px rgba(0,0,0,.14); }

.choices__inner { min-height: 38px; }
.choices[data-type*=select-one] .choices__inner { padding-bottom: 5px; }

/* Tabelas responsivas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
table {
    vertical-align: middle;
}
.table th, .table td {
    white-space: nowrap;
}
.table td.text-wrap, .table th.text-wrap,
.table td:nth-child(7), .table td:nth-child(9) {
    white-space: normal;
    min-width: 180px;
}

/* Filtros nas tabelas */
.linha-filtro-tabela th {
    background: #f8f9fa;
    padding-top: .35rem;
    padding-bottom: .35rem;
}
.filtro-coluna { min-width: 90px; }

@media (max-width: 991.98px) {
    .app-navbar .navbar-collapse {
        margin-top: .75rem;
        padding: .75rem;
        background: rgba(0,0,0,.08);
        border-radius: .5rem;
    }
    .app-navbar .navbar-nav { gap: .15rem; }
    .app-navbar .dropdown-menu {
        box-shadow: none;
        border: 0;
        margin-left: .5rem;
    }
    h1, .h1 { font-size: 1.65rem; }
    h2, .h2 { font-size: 1.45rem; }
    .card-body, .card { overflow-x: auto; }
}

@media (max-width: 575.98px) {
    .app-main { padding-left: .75rem !important; padding-right: .75rem !important; }
    .btn { width: 100%; margin-bottom: .35rem; }
    .btn-group .btn, .table .btn { width: auto; margin-bottom: 0; }
    input[type="date"], .form-control, .form-select { font-size: 16px; }
}

/* Identificação e menu do usuário */
.user-menu .nav-link::after { margin-left: .15rem; }
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.95);
    color: var(--bs-primary);
    font-weight: 700;
    flex: 0 0 34px;
}
.user-identification { line-height: 1.05; max-width: 190px; }
.user-name {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .88rem;
    font-weight: 600;
}
.user-profile { color: rgba(255,255,255,.72); font-size: .72rem; }
.user-dropdown { min-width: 210px; }

@media (max-width: 991.98px) {
    .user-identification { display: none; }
    .user-menu { margin-top: .35rem; }
    .user-menu .nav-link { justify-content: flex-start; }
}

/* =========================================================
   ABASTEK - AGENDA EMBARCADOS
   Login institucional
   ========================================================= */

:root {
    --abastek-blue: #24578A;
    --abastek-blue-dark: #1B456E;
    --abastek-blue-light: #316A9E;
    --abastek-orange: #F27500;
    --abastek-red: #DB4000;
    --abastek-text: #12233f;
    --abastek-muted: #71809a;
    --abastek-border: #d8e1eb;
    --abastek-background: #f7f9fc;
}

body.login-page {
    margin: 0;
    min-height: 100vh;
    background: var(--abastek-background);
    color: var(--abastek-text);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(520px, 1.08fr) minmax(520px, .92fr);
}


/* Painel institucional */

.login-brand-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            var(--abastek-blue) 0%,
            #28679d 55%,
            #215b8d 100%
        );
    color: #fff;
}

.login-brand-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 64px 7%;
    display: flex;
    flex-direction: column;
}

.abastek-logo {
    font-size: 2.55rem;
    line-height: 1;
    letter-spacing: -2px;
    font-weight: 300;
    color: #fff;
}

.abastek-logo span {
    color: var(--abastek-orange);
    font-weight: 700;
}

.login-brand-main {
    margin: auto 0;
    max-width: 790px;
}

.brand-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 17px;
    margin-bottom: 26px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: .77rem;
    letter-spacing: .18em;
    font-weight: 600;
}

.login-brand-main h1 {
    margin: 0 0 14px;
    font-size: clamp(2.7rem, 4vw, 4.1rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -.04em;
}

.brand-description {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, .92);
    font-size: 1.25rem;
    line-height: 1.55;
}

.brand-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 42px;
}

.brand-feature {
    min-height: 94px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .20);
    border-radius: 16px;
    background: rgba(255, 255, 255, .09);
    backdrop-filter: blur(4px);
}

.brand-feature > i {
    font-size: 1.65rem;
}

.brand-feature strong,
.brand-feature span {
    display: block;
}

.brand-feature strong {
    margin-bottom: 3px;
    font-size: .98rem;
}

.brand-feature span {
    color: rgba(255, 255, 255, .76);
    font-size: .82rem;
}

.brand-footer {
    color: rgba(255, 255, 255, .70);
    font-size: .82rem;
}


/* Elementos decorativos */

.brand-decoration {
    position: absolute;
    border-radius: 50%;
    border: 55px solid rgba(255, 255, 255, .06);
}

.brand-decoration-top {
    width: 280px;
    height: 280px;
    top: -90px;
    right: -30px;
}

.brand-decoration-bottom {
    width: 310px;
    height: 310px;
    bottom: -150px;
    left: -115px;
    border-color: rgba(244, 123, 0, .10);
}


/* Painel do formulário */

.login-form-panel {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 8%;
    background: #fbfcfe;
}

.login-form-container {
    width: 100%;
    max-width: 520px;
}

.login-accent {
    width: 52px;
    height: 5px;
    margin-bottom: 22px;
    border-radius: 999px;
    background: var(--abastek-orange);
}

.login-form-container h2 {
    margin-bottom: 8px;
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -.03em;
}

.login-subtitle {
    margin-bottom: 38px;
    color: var(--abastek-muted);
    font-size: .98rem;
}

.login-form-container .form-label {
    margin-bottom: 8px;
    font-weight: 650;
    color: var(--abastek-text);
}

.login-input-wrapper {
    position: relative;
}

.login-input-wrapper > i {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    color: #91a6c3;
    font-size: 1.05rem;
    pointer-events: none;
}

.login-input-wrapper .form-control {
    min-height: 56px;
    padding-left: 52px;
    padding-right: 48px;
    border: 1px solid var(--abastek-border);
    border-radius: 13px;
    background: #fff;
    color: var(--abastek-text);
    font-size: 1rem;
    box-shadow: none;
}

.login-input-wrapper .form-control:focus {
    border-color: var(--abastek-blue-light);
    box-shadow: 0 0 0 .2rem rgba(36, 95, 146, .10);
}

.password-toggle {
    position: absolute;
    z-index: 4;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8194ae;
}

.password-toggle:hover {
    color: var(--abastek-blue);
}

.login-security {
    margin: 20px 0 24px;
}

.login-security .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    margin-right: 7px;
    border-color: #b8c7d9;
}

.login-security .form-check-input:checked {
    background-color: var(--abastek-blue);
    border-color: var(--abastek-blue);
}

.login-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
}

.btn-abastek-login {
    min-height: 56px;
    border: 0;
    border-radius: 13px;
    background: var(--abastek-orange);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.btn-abastek-login:hover,
.btn-abastek-login:focus {
    background: #dd6f00;
    color: #fff;
    box-shadow: 0 8px 22px rgba(244, 123, 0, .22);
}

.btn-abastek-login:active {
    transform: translateY(1px);
}

.login-information {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 28px;
    padding: 18px;
    border: 1px solid #e0e7ef;
    border-radius: 13px;
    background: #fff;
    color: #53657d;
    font-size: .88rem;
    line-height: 1.5;
}

.login-information i {
    margin-top: 2px;
    color: #4388c5;
    font-size: 1.15rem;
}

.login-restricted {
    margin-top: 30px;
    text-align: center;
    color: #91a0b5;
    font-size: .79rem;
}


/* Responsividade */

@media (max-width: 1100px) {
    .login-shell {
        grid-template-columns: 1fr 1fr;
    }

    .brand-features {
        grid-template-columns: 1fr;
    }

    .brand-feature {
        min-height: 72px;
    }
}

@media (max-width: 850px) {
    .login-shell {
        display: block;
    }

    .login-brand-panel {
        min-height: auto;
    }

    .login-brand-content {
        min-height: auto;
        padding: 38px 28px;
    }

    .login-brand-main {
        margin: 55px 0 35px;
    }

    .brand-features {
        grid-template-columns: repeat(3, 1fr);
    }

    .brand-footer {
        display: none;
    }

    .login-form-panel {
        min-height: auto;
        padding: 55px 24px;
    }
}

@media (max-width: 575.98px) {
    body.login-page .btn {
        width: 100%;
        margin-bottom: 0;
    }

    .login-brand-content {
        padding: 30px 22px;
    }

    .abastek-logo {
        font-size: 2rem;
    }

    .login-brand-main {
        margin: 42px 0 10px;
    }

    .login-brand-main h1 {
        font-size: 2.35rem;
    }

    .brand-description {
        font-size: 1rem;
    }

    .brand-features {
        grid-template-columns: 1fr;
        margin-top: 28px;
    }

    .brand-feature {
        min-height: 68px;
    }

    .brand-tag {
        font-size: .62rem;
        letter-spacing: .12em;
    }

    .login-form-panel {
        padding: 42px 20px;
    }

    .login-form-container h2 {
        font-size: 1.75rem;
    }
}

/* =========================================================
   ABASTEK - AGENDA EMBARCADOS
   Interface interna
   ========================================================= */

:root {
    --app-sidebar-width: 270px;
    --app-sidebar-collapsed: 82px;
    --app-topbar-height: 74px;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    background: #f5f7fa;
    color: var(--abastek-text);
}

.app-layout {
    min-height: 100vh;
}


/* SIDEBAR */

.app-sidebar {
    position: fixed;
    z-index: 1040;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--app-sidebar-width);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        linear-gradient(
            180deg,
            var(--abastek-blue) 0%,
            var(--abastek-blue-dark) 100%
        );
    color: #fff;
    transition: width .22s ease, transform .22s ease;
}

.sidebar-brand {
    min-height: 118px;
    display: flex;
    align-items: center;
    padding: 24px 25px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.sidebar-brand-link {
    display: block;
    width: 100%;
    color: #fff;
    text-decoration: none;
}

.sidebar-logo {
    font-size: 2rem;
    line-height: 1;
    letter-spacing: -1.5px;
    font-weight: 300;
}

.sidebar-logo span {
    color: var(--abastek-orange);
    font-weight: 700;
}

.sidebar-product {
    margin-top: 9px;
    color: rgba(255,255,255,.72);
    font-size: .78rem;
    letter-spacing: .04em;
}

.sidebar-navigation {
    flex: 1;
    overflow-y: auto;
    padding: 18px 14px;
}

.sidebar-navigation::-webkit-scrollbar {
    width: 4px;
}

.sidebar-navigation::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.20);
    border-radius: 20px;
}

.sidebar-section-title {
    margin: 19px 13px 8px;
    color: rgba(255,255,255,.45);
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .14em;
}

.sidebar-section-title:first-child {
    margin-top: 2px;
}

.sidebar-link {
    min-height: 45px;
    display: flex;
    align-items: center;
    gap: 13px;
    margin: 3px 0;
    padding: 10px 13px;
    border-radius: 9px;
    color: rgba(255,255,255,.79);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: .15s ease;
}

.sidebar-link i {
    width: 22px;
    flex: 0 0 22px;
    text-align: center;
    font-size: 1.08rem;
}

.sidebar-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.sidebar-link.active {
    background: rgba(255,255,255,.14);
    color: #fff;
    font-weight: 650;
}

.sidebar-link.active::before {
    content: "";
    position: absolute;
    left: 0;
    width: 4px;
    height: 25px;
    border-radius: 0 5px 5px 0;
    background: var(--abastek-orange);
}

.sidebar-footer {
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,.10);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px;
}

.sidebar-user-avatar,
.topbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: .76rem;
}

.sidebar-user-info {
    min-width: 0;
}

.sidebar-user-info strong,
.sidebar-user-info span {
    display: block;
}

.sidebar-user-info strong {
    overflow: hidden;
    color: #fff;
    font-size: .80rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-info span {
    margin-top: 2px;
    color: rgba(255,255,255,.57);
    font-size: .68rem;
}


/* CONTEÚDO */

.app-content {
    min-height: 100vh;
    margin-left: var(--app-sidebar-width);
    transition: margin-left .22s ease;
}

.app-topbar {
    position: sticky;
    z-index: 1030;
    top: 0;
    height: var(--app-topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid #e5eaf0;
    background: rgba(255,255,255,.96);
    box-shadow: 0 1px 4px rgba(22,47,76,.035);
    backdrop-filter: blur(8px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #526780;
    font-size: 1.45rem;
}

.sidebar-toggle:hover {
    background: #f0f4f8;
    color: var(--abastek-blue);
}

.topbar-title {
    color: #2b3e57;
    font-size: .95rem;
    font-weight: 650;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 9px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--abastek-text);
    text-align: left;
}

.topbar-user:hover {
    background: #f3f6f9;
}

.topbar-user::after {
    color: #8da0b6;
}

.topbar-avatar {
    width: 37px;
    height: 37px;
    background: #e6eff7;
    color: var(--abastek-blue);
    font-size: .72rem;
}

.topbar-user-text strong,
.topbar-user-text small {
    display: block;
}

.topbar-user-text strong {
    max-width: 180px;
    overflow: hidden;
    font-size: .80rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-user-text small {
    margin-top: 1px;
    color: #8998aa;
    font-size: .68rem;
}

.app-main {
    width: auto;
    max-width: none;
    padding: 32px;
}


/* CABEÇALHO DE PÁGINA */

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 27px;
}

.page-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--abastek-orange);
    font-size: .67rem;
    font-weight: 750;
    letter-spacing: .13em;
}

.page-header h1 {
    margin: 0;
    color: #172b46;
    font-size: 1.85rem;
    font-weight: 720;
    letter-spacing: -.025em;
}

.page-header p {
    margin: 7px 0 0;
    color: #7a8a9d;
    font-size: .88rem;
}

.btn-abastek-primary {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 17px;
    border: 0;
    border-radius: 9px;
    background: var(--abastek-orange);
    color: #fff;
    font-size: .83rem;
    font-weight: 650;
}

.btn-abastek-primary:hover {
    background: #dd6f00;
    color: #fff;
}


/* INDICADORES */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.dashboard-stat-card {
    min-height: 145px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    border: 1px solid #e3e8ef;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 2px 7px rgba(32,57,84,.035);
}

.stat-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.35rem;
}

.stat-scheduled .stat-icon {
    background: #e7f0f8;
    color: var(--abastek-blue);
}

.stat-completed .stat-icon {
    background: #e7f5ed;
    color: #268654;
}

.stat-cancelled .stat-icon {
    background: #fbecec;
    color: #bf4a4a;
}

.stat-content span,
.stat-content strong,
.stat-content small {
    display: block;
}

.stat-content span {
    color: #53667e;
    font-size: .82rem;
    font-weight: 650;
}

.stat-content strong {
    margin: 3px 0;
    color: #162b46;
    font-size: 2rem;
    line-height: 1.15;
}

.stat-content small {
    color: #99a5b4;
    font-size: .72rem;
}


/* ACESSO RÁPIDO */

.dashboard-section {
    margin-top: 31px;
}

.section-heading {
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0;
    color: #263b55;
    font-size: 1.05rem;
    font-weight: 700;
}

.section-heading p {
    margin: 4px 0 0;
    color: #8a99aa;
    font-size: .78rem;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.quick-action-card {
    position: relative;
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: .16s ease;
}

.quick-action-card:hover {
    border-color: #cbd9e6;
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 6px 17px rgba(32,57,84,.06);
}

.quick-action-icon {
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #edf4fa;
    color: var(--abastek-blue);
    font-size: 1.1rem;
}

.quick-action-card strong,
.quick-action-card span {
    display: block;
}

.quick-action-card strong {
    color: #263c57;
    font-size: .82rem;
}

.quick-action-card span {
    margin-top: 3px;
    color: #8b99aa;
    font-size: .71rem;
}

.quick-action-arrow {
    margin-left: auto;
    color: #b3bfcb;
    font-size: .78rem;
}


/* SIDEBAR RECOLHIDA */

body.sidebar-collapsed .app-sidebar {
    width: var(--app-sidebar-collapsed);
}

body.sidebar-collapsed .app-content {
    margin-left: var(--app-sidebar-collapsed);
}

body.sidebar-collapsed .sidebar-logo-image,
body.sidebar-collapsed .sidebar-product,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-user-info {
    display: none;
}

body.sidebar-collapsed .sidebar-brand {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding-left: 10px;
    padding-right: 10px;
}


/* RESPONSIVO */

@media (max-width: 991.98px) {

    .app-sidebar {
        transform: translateX(-100%);
        width: var(--app-sidebar-width);
    }

    .app-content {
        margin-left: 0;
    }

    body.sidebar-mobile-open .app-sidebar {
        transform: translateX(0);
    }

    .dashboard-stats,
    .quick-actions {
        grid-template-columns: 1fr;
    }

    .app-main {
        padding: 24px 20px;
    }
}

@media (max-width: 575.98px) {

    .app-topbar {
        padding: 0 15px;
    }

    .topbar-user-text,
    .topbar-title {
        display: none;
    }

    .page-header {
        display: block;
    }

    .page-header .btn {
        margin-top: 18px;
    }

    .dashboard-stat-card {
        min-height: 120px;
    }
}

/* ============================================================
   LOGOTIPO OFICIAL ABASTEK
   ============================================================ */

.sidebar-logo {
    display: flex;
    align-items: center;
    width: 100%;
}

.sidebar-logo-image {
    display: block;
    width: 142px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.sidebar-product {
    margin-top: 8px;
    color: rgba(255, 255, 255, .82);
    font-size: .95rem;
    font-weight: 400;
    letter-spacing: .01em;
}