@import url('components.css');

.system-page {
    margin: 0;
    background: #f6f8fa;
    color: var(--text);
    font-family: "Segoe UI", Georgia, Arial, sans-serif;
}

.system-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, var(--navy-950), #081828);
    color: #fff;
    padding: 24px 16px;
    overflow-y: auto;
}

.sidebar__logo {
    width: 135px;
    margin: 4px 10px 30px;
    filter: brightness(0) invert(1);
}

.sidebar-group {
    margin: 18px 10px 8px;
    color: rgba(255,255,255,.38);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
}


.sidebar-nav a {
    min-height: 43px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 13px;
    color: rgba(255,255,255,.67);
    border-radius: 9px;
    text-decoration: none;
    font-size: 13px;
    transition: .2s ease;
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,.055);
}

.sidebar-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    box-shadow: inset 3px 0 0 var(--gold-500);
}

.system-main {
    min-width: 0;
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 32px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
}

.topbar__user strong {
    display: block;
}

.topbar__user span {
    color: var(--muted);
    font-size: 12px;
}

.topbar-bell { position: relative; }
.topbar-bell summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}
.topbar-bell summary::-webkit-details-marker { display: none; }
.topbar-bell summary:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 2px; }
.topbar-bell svg { width: 18px; height: 18px; fill: var(--navy-900); }
.topbar-bell__count {
    min-width: 18px;
    color: var(--navy-950);
    font-size: 13px;
    font-weight: 800;
}
.topbar-bell__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 40;
    width: min(400px, calc(100vw - 24px));
    max-height: min(420px, calc(100vh - 96px));
    overflow: auto;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(7, 28, 50, .12);
}
.topbar-bell__panel p { margin: 8px; color: var(--muted); }
.topbar-bell__panel form { margin: 0; }
.topbar-bell__panel button {
    width: 100%;
    display: grid;
    gap: 3px;
    text-align: left;
    border: 0;
    border-radius: 10px;
    background: rgba(230, 160, 0, .08);
    padding: 10px 12px;
    cursor: pointer;
}
.topbar-bell__panel button + form,
.topbar-bell__panel form + form { margin-top: 6px; }
.topbar-bell__panel button.is-read { background: transparent; }
.topbar-bell__panel strong { color: var(--navy-950); font-size: 14px; }
.topbar-bell__panel span,
.topbar-bell__panel small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.notif-inbox { margin-bottom: 16px; }
.notif-inbox__item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-top: 1px solid var(--border);
}
.notif-inbox__item p { margin: 4px 0 0; color: var(--muted); }
@media (max-width: 767px) {
    .notif-inbox__item { flex-direction: column; align-items: stretch; }
    .topbar {
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 10px;
        padding: 10px 12px;
        min-height: 0;
    }
    .topbar > span {
        flex: 1 1 100%;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .topbar__user { gap: 8px; margin-left: auto; min-width: 0; }
    .topbar__user > div { min-width: 0; }
    .topbar__user > div strong,
    .topbar__user > div span {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.page-content {
    padding: 30px 32px 46px;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.page-heading h1 {
    margin: 0;
    font-size: 27px;
    letter-spacing: -.025em;
}

.page-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.master-view-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 42px;
    padding: 6px 20px;
    background: #fff5d8;
    border-bottom: 1px solid #efdba1;
    color: #755000;
    font-size: 12px;
    font-weight: 600;
}

.sidebar-toggle {
    display: none;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    height: 40px;
    padding: 0 12px;
    cursor: pointer;
}

.sidebar-backdrop {
    display: none;
}

/* AUTH */
.auth-page {
    min-height: 100vh;
    margin: 0;
    background: var(--off-white);
    color: var(--text);
    font-family: "Segoe UI", Georgia, Arial, sans-serif;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(480px, .95fr);
}

.auth-left {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: #f3f2ef;
}

.auth-photo {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(7,28,50,.08), rgba(230,160,0,.08)),
        url("../img/login-fama-bg.webp") left center / cover no-repeat;
    filter: saturate(.72);
}

.auth-photo-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(248,247,244,.97) 0%,
            rgba(248,247,244,.91) 48%,
            rgba(248,247,244,.45) 75%,
            rgba(248,247,244,.10) 100%
        );
}

.auth-left__inner {
    position: relative;
    z-index: 2;
    width: min(760px, calc(100% - 90px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 50px 0 44px;
    display: flex;
    flex-direction: column;
}

.auth-logo {
    width: 185px;
    height: auto;
    object-fit: contain;
    margin-bottom: 70px;
}

.auth-message {
    width: min(480px, 100%);
    margin-bottom: 34px;
}

.auth-kicker,
.login-card__eyebrow,
.auth-access__kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
}

.auth-kicker {
    color: var(--gold-600);
    margin-bottom: 14px;
}

.auth-message h1 {
    margin: 0;
    color: var(--navy-950);
    font-size: clamp(42px, 4vw, 64px);
    font-weight: 500;
    line-height: .98;
    letter-spacing: -.045em;
}

.auth-message h1 span {
    display: block;
    margin-top: 5px;
    color: var(--gold-500);
    font-family: Georgia, serif;
    font-style: italic;
    font-weight: 500;
}

.auth-message p {
    width: min(430px, 100%);
    margin: 22px 0 0;
    color: #526171;
    font-size: 15px;
    line-height: 1.65;
}

.login-card {
    width: min(455px, 100%);
    padding: 30px 32px 28px;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(7,28,50,.07);
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(7,28,50,.12);
    backdrop-filter: blur(14px);
}

.login-card__eyebrow {
    color: var(--gold-600);
}

.login-card h2 {
    margin: 7px 0 5px;
    font-size: 26px;
    letter-spacing: -.025em;
}

.login-card > p {
    margin: 0 0 22px;
    color: var(--muted);
    font-size: 13px;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid #dfe4e9;
    border-radius: 10px;
    background: #fff;
    padding: 0 82px 0 42px;
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.input-wrap input:focus {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 4px rgba(230,160,0,.10);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #667789;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #627182;
    font-size: 11px;
    cursor: pointer;
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 18px;
    font-size: 12px;
}

.auth-options a,
.login-support a {
    color: #b87900;
    text-decoration: none;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #59697a;
}

.login-support {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #edf0f2;
    color: #6b7785;
    text-align: center;
    font-size: 11px;
}

.auth-signature {
    margin: auto 0 0;
    color: rgba(20,38,58,.48);
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 15px;
}

.auth-access {
    min-height: 100vh;
    color: #fff;
    background:
        radial-gradient(circle at 85% 18%, rgba(242,182,50,.09), transparent 25%),
        linear-gradient(145deg, #071C32 0%, #0B2947 64%, #071827 100%);
}

.auth-access__inner {
    width: min(690px, calc(100% - 80px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 68px 0 42px;
    display: flex;
    flex-direction: column;
}

.line-mark {
    display: block;
    width: 28px;
    height: 3px;
    margin-bottom: 18px;
    background: var(--gold-500);
}

.auth-access__kicker {
    color: rgba(255,255,255,.58);
}

.auth-access__heading h2 {
    margin: 17px 0 15px;
    font-size: clamp(38px, 3.3vw, 54px);
    line-height: 1.02;
    font-weight: 400;
    letter-spacing: -.04em;
}

.auth-access__heading h2 strong {
    color: var(--gold-400);
    font-weight: 650;
}

.auth-access__heading > p:last-child {
    max-width: 570px;
    color: rgba(255,255,255,.62);
    line-height: 1.65;
}

.access-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
    margin-top: 30px;
}

.access-role {
    min-height: 160px;
    padding: 22px;
    display: flex;
    gap: 16px;
    border: 1px solid rgba(255,255,255,.17);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.access-role:hover {
    transform: translateY(-2px);
    border-color: rgba(242,182,50,.40);
    background: rgba(255,255,255,.045);
}

.access-role__icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 1px solid var(--gold-500);
    border-radius: 50%;
    color: var(--gold-400);
    font-size: 20px;
}

.access-role h3 {
    margin: 2px 0 3px;
    font-size: 16px;
}

.access-role strong {
    display: block;
    color: var(--gold-400);
    font-size: 11px;
    font-weight: 600;
}

.access-role p {
    margin: 11px 0 0;
    color: rgba(255,255,255,.61);
    font-size: 12px;
    line-height: 1.55;
}

.cms-note {
    margin-top: 24px;
    padding: 22px 24px;
    border-top: 1px solid rgba(242,182,50,.55);
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.cms-note span {
    color: var(--gold-400);
    font-size: 10px;
    letter-spacing: .16em;
}

.cms-note h3 {
    margin: 7px 0;
    font-size: 18px;
}

.cms-note p {
    margin: 0;
    color: rgba(255,255,255,.60);
    font-size: 12px;
    line-height: 1.55;
}

.auth-access__footer {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.auth-access__footer img {
    width: 112px;
    filter: brightness(0) invert(1);
    opacity: .94;
}

.auth-access__footer span {
    max-width: 260px;
    color: rgba(255,255,255,.44);
    font-size: 9px;
    line-height: 1.6;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.timer-display {
    font-size: clamp(64px, 12vw, 120px);
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--navy-950);
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.timer-stage {
    min-height: 320px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-lg);
    background: #fff;
    border: 1px solid var(--border);
    transition: background .3s ease, color .3s ease;
}

.timer-stage.is-warning {
    background: #fff5d8;
}

.timer-stage.is-final {
    background: #071C32;
    color: #fff;
}

.timer-stage.is-final .timer-display {
    color: #fff;
}

.view-as-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.system-page .user-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0 0 20px;
    padding: 0 6px;
    background: #fff;
    border: 1px solid #E6E9ED;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(7, 28, 50, 0.04);
    overflow: hidden;
}

.system-page .user-tabs__item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #647180;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color .2s ease, background .2s ease;
}

.system-page .user-tabs__item::after {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 2px;
    background: transparent;
    border-radius: 2px 2px 0 0;
    transition: background .2s ease;
}

.system-page .user-tabs__item:hover {
    color: #071C32;
    background: #f8fafc;
}

.system-page .user-tabs__item .user-tabs__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #EEF2F6;
    color: #526171;
    font-size: 11px;
    font-weight: 700;
}

.system-page .user-tabs__item.is-active {
    color: #071C32;
    background: transparent;
}

.system-page .user-tabs__item.is-active::after {
    background: #E6A000;
}

.system-page .user-tabs__item em {
    font-style: normal;
    font-weight: 650;
}

@media (max-width: 650px) {
    .system-page .user-tabs {
        flex-direction: column;
        padding: 6px;
    }

    .system-page .user-tabs__item {
        min-height: 44px;
        border-radius: 10px;
    }

    .system-page .user-tabs__item.is-active {
        background: #F8F7F4;
    }

    .system-page .user-tabs__item::after {
        display: none;
    }
}

/* Wizard steps (operação FAMA) */
.system-page .wizard-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.system-page .wizard-step {
    flex: 1 1 140px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    opacity: 0.65;
}

.system-page .wizard-step.is-active {
    opacity: 1;
    border-color: #E6A000;
    box-shadow: 0 0 0 1px rgba(230, 160, 0, 0.25);
}

.system-page .wizard-step__number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    background: #071C32;
    color: #fff;
    font-size: 14px;
}

.system-page .wizard-step.is-active .wizard-step__number {
    background: #E6A000;
    color: #071C32;
}

.wizard-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 28px;
}

.wizard-step {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.wizard-step.is-active {
    border-color: var(--gold-500);
    box-shadow: 0 0 0 3px rgba(230,160,0,.10);
}

.wizard-step__number {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    margin-bottom: 8px;
    border-radius: 50%;
    background: var(--surface-soft, #F5F7F9);
    font-size: 12px;
    font-weight: 800;
}

.wizard-step.is-active .wizard-step__number {
    color: #fff;
    background: var(--gold-500);
}

@media (max-width: 900px) {
    .wizard-steps {
        grid-template-columns: 1fr;
    }
}

.pwd-first-notice {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    width: min(520px, calc(100vw - 32px));
    margin: 0;
}

.pwd-first-dialog {
    border: 0;
    border-radius: 16px;
    padding: 24px 22px 22px;
    width: min(440px, calc(100vw - 32px));
    box-shadow: 0 18px 50px rgba(10, 20, 35, .22);
}

.pwd-first-dialog::backdrop {
    background: rgba(10, 20, 35, .55);
}

.pwd-first-dialog h2 {
    margin: 0 0 8px;
    color: var(--navy-950);
    font-size: 1.35rem;
}

.pwd-first-dialog p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.45;
}

.pwd-first-dialog .field {
    margin-bottom: 12px;
}

.pwd-first-dialog .alert {
    margin-bottom: 12px;
}

@media (max-width: 640px) {
    .pwd-first-dialog {
        padding: 20px 16px 16px;
    }

    .pwd-first-dialog .btn {
        min-height: 44px;
        width: 100%;
    }
}



