@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #0891B2;
    --primary-hover: #06B6D4;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --text: #1E293B;
    --text-soft: #64748B;
    --border: #E2E8F0;
    --success: #16A34A;
    --danger: #DC2626;
    --warning: #D97706;
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html[data-theme="dark"] {
    --primary: #22D3EE;
    --primary-hover: #67E8F9;
    --bg: #0F172A;
    --surface: #111827;
    --text: #E5E7EB;
    --text-soft: #94A3B8;
    --border: #334155;
    --success: #22C55E;
    --danger: #F87171;
    --warning: #F59E0B;
    --shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
}

.login-page,
.public-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.login-box,
.public-box {
    width: 100%;
    max-width: 1100px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 570px;
}

.login-left {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-left h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 1.15;
}

.login-left p {
    margin: 0 0 16px;
    line-height: 1.7;
    font-size: 16px;
}

.login-right {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-right h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: clamp(1.8rem, 3vw, 2.125rem);
    line-height: 1.15;
}

.public-box {
    padding: 36px;
}

.public-header {
    margin-bottom: 24px;
}

.public-header h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 2.5rem);
}

.public-header p {
    margin: 0;
    color: var(--text-soft);
    font-size: 16px;
    line-height: 1.6;
}

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

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

.full {
    grid-column: 1 / -1;
}

/* NOVO: PADRÃO PARA CAMPOS INDIVIDUAIS */
.form-field {
    margin-bottom: 16px;
}

.form-field:last-of-type {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

input,
select,
textarea {
    max-width: 100%;
    width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-appearance: none;
    appearance: none;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 54px;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1;
}

.password-toggle-btn:hover {
    background: #ECFEFF;
    color: var(--primary);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16), 0 8px 16px rgba(8, 145, 178, 0.1);
    background: #ffffff;
}

input[disabled],
select[disabled],
textarea[disabled] {
    background: #F8FAFC;
    color: #475569;
    cursor: not-allowed;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

.btn,
button,
button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    font-size: clamp(0.875rem, 1.6vw, 0.95rem);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    overflow-wrap: anywhere;
    white-space: normal;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.btn-primary,
button,
button[type="submit"] {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(8, 145, 178, 0.16);
}

.btn-primary:hover,
button:hover,
button[type="submit"]:hover {
    background: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(6, 182, 212, 0.34),
        0 0 0 3px rgba(6, 182, 212, 0.2);
}

.btn-light {
    background: #EEF2FF;
    color: var(--primary);
}

.btn-light:hover {
    background: #CFFAFE;
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    opacity: .92;
}

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 600;
    font-size: 14px;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: clamp(240px, 22vw, 280px);
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 24px 18px;
    box-shadow: var(--shadow);
}

.brand {
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    line-height: 1.12;
    margin-bottom: 6px;
    overflow-wrap: anywhere;
}

.brand-sub {
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 26px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--text);
    font-weight: 700;
    overflow-wrap: anywhere;
    transition: .2s ease;
}

.nav a:hover,
.nav a.active {
    background: var(--primary);
    color: #fff;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 28px;
}

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

.page-title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2rem);
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--text-soft);
    max-width: 780px;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.grid-cards--four {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: clamp(16px, 2vw, 20px);
    box-shadow: var(--shadow);
    min-width: 0;
}

.card-title {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-soft);
    letter-spacing: .5px;
}

.card-value {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.125rem);
    font-weight: 700;
    word-break: break-word;
}

.card-value-sm {
    font-size: clamp(1.25rem, 2.2vw, 1.375rem);
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: clamp(16px, 2vw, 22px);
    margin-bottom: 24px;
    min-width: 0;
}

.panel-title,
.section-title,
.setor-titulo {
    margin: 0 0 14px;
    font-weight: 700;
    color: var(--text);
}

.section-title {
    margin-top: 26px;
    font-size: 20px;
}

.panel-title,
.setor-titulo {
    font-size: 18px;
}

.grid-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.mini-list,
.mini-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    padding: 16px;
    box-shadow: var(--shadow);
}

.notification-item.is-unread {
    border-color: rgba(6, 182, 212, 0.45);
    background: #ECFEFF;
}

.notification-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.notification-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.notification-meta {
    color: var(--text-soft);
    font-size: 13px;
}

.notification-text {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.notification-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.badge-notification {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.mini-row,
.mini-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.mini-row strong,
.mini-item strong {
    display: block;
}

.mini-row span,
.mini-item span {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
}

.empty-state,
.empty-box {
    padding: 14px;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
    background: #fafafa;
    color: var(--text-soft);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.table-dashboard {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
    overflow-wrap: anywhere;
}

table th {
    color: var(--text-soft);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: .5px;
}

.table-dashboard th {
    background: #f8fafc;
    font-weight: 700;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.status-ativo,
.status-presenca-ok {
    background: #DCFCE7;
    color: #166534;
}

.status-pendente {
    background: #FEF3C7;
    color: #92400E;
}

.status-confirmado {
    background: #CFFAFE;
    color: #0E7490;
}

.status-inativo,
.status-presenca-pendente {
    background: #FEE2E2;
    color: #991B1B;
}

.status-card {
    color: #fff;
    border-radius: 16px;
    padding: clamp(16px, 2vw, 20px);
    box-shadow: var(--shadow);
    min-width: 0;
}

.status-card h3 {
    margin: 0 0 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.status-card strong {
    font-size: 28px;
    line-height: 1.2;
}

.status-card.status-ativo {
    background: #166534;
}

.status-card.status-confirmado {
    background: #0E7490;
}

.status-card.status-pendente {
    background: #92400E;
}

.status-card.status-inativo {
    background: #991B1B;
}

.data-list p {
    margin: 8px 0;
}

.data-list strong {
    color: var(--text);
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #374151;
}

.qr-panel {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: center;
}

.qr-box {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.qr-box img {
    width: 100%;
    max-width: 260px;
    height: auto;
    display: block;
    margin: 0 auto 12px;
    border-radius: 12px;
    background: #fff;
}

.codigo-presenca {
    display: inline-block;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f3f4f6;
    border: 1px dashed #9ca3af;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    word-break: break-word;
}

.qr-info p {
    margin: 0 0 12px;
    color: #374151;
    line-height: 1.5;
}

.qr-info h3 {
    margin: 0 0 10px;
}

.qr-lista {
    margin: 0;
    padding-left: 18px;
    color: #374151;
}

.qr-lista li {
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.success {
    background: #DCFCE7;
    color: #166534;
}

.badge.danger {
    background: #FEE2E2;
    color: #991B1B;
}

.theme-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    width: 46px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.theme-toggle:hover {
    background: var(--primary);
    color: #fff;
}

.theme-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.theme-toggle-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
}

.theme-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.theme-icon-sun {
    display: none;
}

html[data-theme="dark"] .theme-icon-moon {
    display: none;
}

html[data-theme="dark"] .theme-icon-sun {
    display: block;
}

html[data-theme="dark"] .login-box,
html[data-theme="dark"] .public-box,
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .mini-row,
html[data-theme="dark"] .mini-item,
html[data-theme="dark"] .qr-box,
html[data-theme="dark"] .notification-item,
html[data-theme="dark"] .login-right,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .status-box,
html[data-theme="dark"] .finance-card,
html[data-theme="dark"] .finance-table,
html[data-theme="dark"] .summary-card,
html[data-theme="dark"] .tools-card,
html[data-theme="dark"] .checkin-card {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #0F172A;
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.25), 0 8px 16px rgba(8, 145, 178, 0.16);
    background: #111827;
}

html[data-theme="dark"] input[disabled],
html[data-theme="dark"] select[disabled],
html[data-theme="dark"] textarea[disabled] {
    background: #172033;
    color: #CBD5E1;
}

html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .empty-box,
html[data-theme="dark"] .codigo-presenca,
html[data-theme="dark"] .table-dashboard th,
html[data-theme="dark"] .notification-item.is-unread {
    background: #172033;
    border-color: var(--border);
    color: var(--text-soft);
}

html[data-theme="dark"] .notification-item.is-unread {
    border-color: rgba(34, 211, 238, 0.45);
    background: rgba(8, 145, 178, 0.16);
}

html[data-theme="dark"] .meta-row,
html[data-theme="dark"] .qr-info p,
html[data-theme="dark"] .qr-lista,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .footer-note,
html[data-theme="dark"] .acesso-opcoes-title {
    color: var(--text-soft);
}

html[data-theme="dark"] table th {
    background: #172033;
    color: var(--text-soft);
    border-color: var(--border);
}

html[data-theme="dark"] table td {
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="dark"] tbody tr:hover {
    background-color: rgba(34, 211, 238, 0.08);
}

html[data-theme="dark"] .table-dashboard tbody tr:hover {
    background-color: rgba(6, 182, 212, 0.12);
}

html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .status-card:hover {
    border-color: rgba(96, 165, 250, 0.3);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(6, 182, 212, 0.16);
}

html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] button,
html[data-theme="dark"] button[type="submit"] {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] button:hover,
html[data-theme="dark"] button[type="submit"]:hover {
    box-shadow: 0 8px 20px rgba(96, 165, 250, 0.25), 0 0 0 3px rgba(96, 165, 250, 0.15);
}

html[data-theme="dark"] .btn-light {
    background: #1E293B;
    color: #A5F3FC;
}

html[data-theme="dark"] .btn-light:hover {
    background: #334155;
    color: #fff;
}

html[data-theme="dark"] .alert-danger {
    background: rgba(127, 29, 29, 0.45);
    border-color: rgba(248, 113, 113, 0.36);
    color: #FCA5A5;
}

html[data-theme="dark"] .alert-success {
    background: rgba(20, 83, 45, 0.45);
    border-color: rgba(74, 222, 128, 0.34);
    color: #86EFAC;
}

html[data-theme="dark"] .status-ativo,
html[data-theme="dark"] .status-presenca-ok,
html[data-theme="dark"] .badge.success {
    background: rgba(34, 197, 94, 0.16);
    color: #86EFAC;
}

html[data-theme="dark"] .status-pendente {
    background: rgba(245, 158, 11, 0.16);
    color: #FCD34D;
}

html[data-theme="dark"] .status-confirmado {
    background: rgba(34, 211, 238, 0.16);
    color: #67E8F9;
}

html[data-theme="dark"] .status-inativo,
html[data-theme="dark"] .status-presenca-pendente,
html[data-theme="dark"] .badge.danger {
    background: rgba(248, 113, 113, 0.16);
    color: #FCA5A5;
}

html[data-theme="dark"] .password-toggle-btn,
html[data-theme="dark"] .theme-toggle {
    background: #172033;
    border-color: var(--border);
    color: var(--text);
}

html[data-theme="dark"] .password-toggle-btn:hover,
html[data-theme="dark"] .theme-toggle:hover {
    background: var(--primary);
    color: #06202A;
}

html[data-theme="dark"] [style*="background: #fff"],
html[data-theme="dark"] [style*="background:#fff"],
html[data-theme="dark"] [style*="background: #ffffff"],
html[data-theme="dark"] [style*="background:#ffffff"],
html[data-theme="dark"] [style*="background: #f8fafc"],
html[data-theme="dark"] [style*="background:#f8fafc"],
html[data-theme="dark"] [style*="background: #fafafa"],
html[data-theme="dark"] [style*="background:#fafafa"],
html[data-theme="dark"] [style*="background: #f3f4f6"],
html[data-theme="dark"] [style*="background:#f3f4f6"],
html[data-theme="dark"] [style*="background: #eef2ff"],
html[data-theme="dark"] [style*="background:#eef2ff"] {
    background: #172033 !important;
}

html[data-theme="dark"] [style*="border: 1px solid #e5e7eb"],
html[data-theme="dark"] [style*="border:1px solid #e5e7eb"],
html[data-theme="dark"] [style*="border: 1px solid #cbd5e1"],
html[data-theme="dark"] [style*="border:1px solid #cbd5e1"],
html[data-theme="dark"] [style*="border-bottom: 1px solid #e5e7eb"],
html[data-theme="dark"] [style*="border-bottom:1px solid #e5e7eb"] {
    border-color: var(--border) !important;
}

html[data-theme="dark"] [style*="color: #0f172a"],
html[data-theme="dark"] [style*="color:#0f172a"],
html[data-theme="dark"] [style*="color: #111827"],
html[data-theme="dark"] [style*="color:#111827"],
html[data-theme="dark"] [style*="color: #334155"],
html[data-theme="dark"] [style*="color:#334155"],
html[data-theme="dark"] [style*="color: #374151"],
html[data-theme="dark"] [style*="color:#374151"] {
    color: var(--text) !important;
}

html[data-theme="dark"] [style*="color: #64748b"],
html[data-theme="dark"] [style*="color:#64748b"] {
    color: var(--text-soft) !important;
}

.footer-note {
    color: var(--text-soft);
    font-size: 13px;
    margin-top: 20px;
    line-height: 1.6;
}

.footer-note a {
    font-weight: 700;
}

.footer-note a:hover {
    text-decoration: underline;
}

/* BOTÕES DE ACESSO PADRÃO */
.acesso-opcoes,
.acesso-botoes {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-top: 20px;
    width: 100%;
}

.acesso-opcoes a,
.acesso-botoes a,
.btn-acesso {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 44px;
    text-align: center;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    transition: all .2s ease;
}

.btn-acesso:hover,
.acesso-opcoes a:hover,
.acesso-botoes a:hover {
    opacity: 0.92;
    transform: translateY(-2px);
    color: #fff;
}

.acesso-opcoes a.btn-inscricao,
.acesso-botoes a.btn-inscricao,
.btn-acesso.btn-inscricao,
.acesso-opcoes a.btn-inscricao:hover,
.acesso-botoes a.btn-inscricao:hover,
.btn-acesso.btn-inscricao:hover {
    color: #92400e !important;
}

.acesso-opcoes a.btn-inscrito,
.acesso-botoes a.btn-inscrito,
.btn-acesso.btn-inscrito,
.acesso-opcoes a.btn-inscrito:hover,
.acesso-botoes a.btn-inscrito:hover,
.btn-acesso.btn-inscrito:hover {
    color: #0E7490 !important;
}

.acesso-opcoes a.btn-admin,
.acesso-opcoes a.btn-admin-alt,
.acesso-botoes a.btn-admin,
.acesso-botoes a.btn-admin-alt,
.btn-acesso.btn-admin,
.btn-acesso.btn-admin-alt,
.acesso-opcoes a.btn-admin:hover,
.acesso-opcoes a.btn-admin-alt:hover,
.acesso-botoes a.btn-admin:hover,
.acesso-botoes a.btn-admin-alt:hover,
.btn-acesso.btn-admin:hover,
.btn-acesso.btn-admin-alt:hover {
    color: #334155 !important;
}

.acesso-opcoes a.btn-voluntario,
.acesso-botoes a.btn-voluntario,
.btn-acesso.btn-voluntario,
.acesso-opcoes a.btn-voluntario:hover,
.acesso-botoes a.btn-voluntario:hover,
.btn-acesso.btn-voluntario:hover {
    color: #166534 !important;
}

html[data-theme="dark"] .acesso-opcoes a.btn-inscricao,
html[data-theme="dark"] .acesso-botoes a.btn-inscricao,
html[data-theme="dark"] .btn-acesso.btn-inscricao,
html[data-theme="dark"] .acesso-opcoes a.btn-inscricao:hover,
html[data-theme="dark"] .acesso-botoes a.btn-inscricao:hover,
html[data-theme="dark"] .btn-acesso.btn-inscricao:hover {
    color: #fbbf24 !important;
}

html[data-theme="dark"] .acesso-opcoes a.btn-inscrito,
html[data-theme="dark"] .acesso-botoes a.btn-inscrito,
html[data-theme="dark"] .btn-acesso.btn-inscrito,
html[data-theme="dark"] .acesso-opcoes a.btn-inscrito:hover,
html[data-theme="dark"] .acesso-botoes a.btn-inscrito:hover,
html[data-theme="dark"] .btn-acesso.btn-inscrito:hover {
    color: #22D3EE !important;
}

html[data-theme="dark"] .acesso-opcoes a.btn-admin,
html[data-theme="dark"] .acesso-opcoes a.btn-admin-alt,
html[data-theme="dark"] .acesso-botoes a.btn-admin,
html[data-theme="dark"] .acesso-botoes a.btn-admin-alt,
html[data-theme="dark"] .btn-acesso.btn-admin,
html[data-theme="dark"] .btn-acesso.btn-admin-alt,
html[data-theme="dark"] .acesso-opcoes a.btn-admin:hover,
html[data-theme="dark"] .acesso-opcoes a.btn-admin-alt:hover,
html[data-theme="dark"] .acesso-botoes a.btn-admin:hover,
html[data-theme="dark"] .acesso-botoes a.btn-admin-alt:hover,
html[data-theme="dark"] .btn-acesso.btn-admin:hover,
html[data-theme="dark"] .btn-acesso.btn-admin-alt:hover {
    color: #cbd5e1 !important;
}

html[data-theme="dark"] .acesso-opcoes a.btn-voluntario,
html[data-theme="dark"] .acesso-botoes a.btn-voluntario,
html[data-theme="dark"] .btn-acesso.btn-voluntario,
html[data-theme="dark"] .acesso-opcoes a.btn-voluntario:hover,
html[data-theme="dark"] .acesso-botoes a.btn-voluntario:hover,
html[data-theme="dark"] .btn-acesso.btn-voluntario:hover {
    color: #4ade80 !important;
}

.btn-inscrito {
    background: #0891B2;
}

.btn-inscrito:hover {
    background: #0E7490;
}

.btn-admin,
.btn-admin-alt {
    background: #2F3E4E;
}

.btn-admin:hover,
.btn-admin-alt:hover {
    background: #364a5f;
    color: #fff;
}

.btn-voluntario {
    background: #2EA45F;
    color: #fff;
}

.btn-voluntario:hover {
    background: #278C51;
    color: #fff;
}

/* Footer global do sistema */
.app-footer {
    margin-top: 32px;
    padding: 18px 20px;
    text-align: center;
    font-size: 13px;
    color: #fff;
    border: 0;
    border-radius: 8px;
    background: #111827;
}

.app-footer--compact {
    margin-top: 24px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.25;
    color: #fff;
    background: #111827;
    border: 0;
    border-radius: 8px;
}

.app-footer p {
    margin: 0;
    color: #fff;
}

.app-footer strong {
    color: #fff;
    font-weight: 700;
}

/* AJUSTES EXTRAS PARA TELAS DE LOGIN */
.login-right form {
    width: 100%;
}

.login-right .actions .btn,
.login-right .actions button,
.login-right .actions a {
    min-width: 150px;
}

.theme-corporate {
    background: var(--bg);
    color: var(--text);
}

body.login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.login-screen .login-page {
    flex: 1 0 auto;
    min-height: calc(100vh - 34px);
    padding-top: clamp(18px, 5vh, 40px);
    padding-bottom: clamp(14px, 3vh, 24px);
}

body.login-screen .login-grid {
    min-height: min(708px, calc(100vh - 96px));
}

body.login-screen .app-footer--compact {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 0;
    border-radius: 0;
}

@media (max-width: 1200px) {
    .grid-cards {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .grid-cards--four {
        grid-template-columns: repeat(2, minmax(200px, 1fr));
    }

    .grid-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .form-grid,
    .form-grid-3,
    .login-grid,
    .qr-panel {
        grid-template-columns: 1fr;
    }

    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 18px 16px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    }

    .brand,
    .brand-sub {
        text-align: center;
    }

    .brand-sub {
        margin-bottom: 16px;
    }

    .nav {
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .content,
    .public-box,
    .login-left,
    .login-right {
        padding: 22px;
    }

    .login-grid {
        min-height: auto;
    }

    .login-left h1,
    .public-header h1 {
        font-size: 32px;
    }

    .login-right h2 {
        font-size: 28px;
    }

    .acesso-opcoes a,
    .acesso-botoes a,
    .btn-acesso {
        width: 100%;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .actions .btn,
    .actions button,
    .actions a {
        width: 100%;
    }

    .grid-cards,
    .grid-cards--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-footer {
        padding: 16px;
        font-size: 12px;
    }

    .app-footer--compact {
        padding: 8px 10px;
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .login-page,
    .public-page,
    .content {
        padding: 16px;
    }

    .login-left,
    .login-right,
    .public-box,
    .panel,
    .card {
        padding: 16px;
    }

    .grid-cards,
    .grid-cards--four,
    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 18px;
    }

    .page-header > * {
        min-width: 0;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .page-subtitle,
    .public-header p,
    .login-left p {
        font-size: 14px;
    }

    table th,
    table td {
        padding: 10px 8px;
        font-size: 13px;
    }

    .table-dashboard {
        min-width: 640px;
    }

    .mini-row,
    .mini-item,
    .notification-head {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-actions,
    .dispatch-actions,
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .notification-actions .btn,
    .notification-actions button,
    .dispatch-actions .btn,
    .dispatch-actions button,
    .form-actions .btn,
    .form-actions button,
    .form-actions a {
        width: 100%;
    }

    .card-title {
        font-size: 12px;
    }

    .card-value {
        font-size: 1.5rem;
    }

    .status-card strong {
        font-size: 1.5rem;
    }

    .theme-toggle {
        right: 14px;
        bottom: 14px;
        width: 44px;
        min-height: 44px;
        padding: 0;
        font-size: 13px;
    }
}

/* ==========================================================================
   ANIMAÇÕES DE ENTRADA (FADE-IN UP)
   ========================================================================== */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Aplica a animação aos principais blocos do sistema */
.login-box,
.public-box,
.card,
.panel,
.status-card,
.qr-box {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Efeito cascata (stagger) para os cards no topo dos dashboards */
.grid-cards > div:nth-child(1) { animation-delay: 0.05s; }
.grid-cards > div:nth-child(2) { animation-delay: 0.10s; }
.grid-cards > div:nth-child(3) { animation-delay: 0.15s; }
.grid-cards > div:nth-child(4) { animation-delay: 0.20s; }

/* ==========================================================================
   BARRA DE PROGRESSO GLOBAL (TOP LOADING BAR)
   ========================================================================== */
#global-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary-hover);
    z-index: 99999;
    transition: width 0.4s ease, opacity 0.4s ease;
    width: 0;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.5);
}

/* ==========================================================================
   SPINNER / LOADING ANIMATION (BOTÕES)
   ========================================================================== */
.spinner {
    animation: spinner-rotate 2s linear infinite;
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

.spinner circle {
    stroke: currentColor;
    stroke-linecap: round;
    animation: spinner-dash 1.5s ease-in-out infinite;
}

@keyframes spinner-rotate {
    100% { transform: rotate(360deg); }
}

@keyframes spinner-dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}
