/* =========================================================
   Aracaju Mobilidade — Estilos Globais
   ========================================================= */

:root {
    --sidebar-width:   260px;
    --sidebar-bg:      #0d0d0d;
    --sidebar-hover:   #1c1c1c;
    --sidebar-active:  #c8870a;
    --gold:            #d4960a;
    --gold-light:      #f5c518;
    --gold-muted:      rgba(212, 150, 10, 0.12);
    --topbar-h:        62px;
    --radius:          10px;
}

/* ----- Reset & Body ----- */
*,
*::before,
*::after { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
}

/* =========================================================
   LAYOUT AUTENTICADO (sidebar + main)
   ========================================================= */

body.has-sidebar {
    background: #f1f3f5;
}

/* ----- Sidebar ----- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow: hidden;
    border-right: 1px solid #1f1f1f;
}

/* ----- Brand ----- */
.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    height: var(--topbar-h);
    border-bottom: 1px solid #1f1f1f;
    text-decoration: none;
    overflow: hidden;
}

.sidebar-logo {
    max-height: 46px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    overflow: hidden;
}

.sidebar-brand-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: .01em;
}

.sidebar-brand-sub {
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .12em;
    white-space: nowrap;
}

/* ----- Nav links ----- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #2a2a2a transparent;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: #8a8a8a;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-nav a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
    border-left-color: var(--gold);
}

.sidebar-nav a.active {
    background: var(--gold-muted);
    color: var(--gold-light);
    border-left-color: var(--gold);
    font-weight: 600;
}

/* ----- Sidebar section label ----- */
.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #3d3d3d;
    padding: 16px 18px 5px;
}

/* ----- Sidebar user row ----- */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid #1f1f1f;
    color: #8a8a8a;
    font-size: 0.84rem;
    background: #0a0a0a;
}

.sidebar-user .user-name {
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}

.sidebar-user .user-role {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 500;
}

.sidebar-user i.bi-person-circle {
    color: var(--gold);
}

.logout-btn {
    color: #3d3d3d;
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.15s;
    margin-left: auto;
    flex-shrink: 0;
}
.logout-btn:hover { color: #ef4444; }

/* ----- Main content area ----- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    padding: 0 24px;
}

.topbar h5 {
    color: #1a1a1a;
}

.content-area {
    min-height: calc(100vh - var(--topbar-h));
}

/* =========================================================
   CARDS
   ========================================================= */

.card {
    border-radius: var(--radius) !important;
}

.card-header {
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

.stat-card {
    border-radius: 12px !important;
}

/* =========================================================
   BUTTONS — sobrescreve primary para gold
   ========================================================= */

.btn-primary {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #fff;
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: #b57a08;
    border-color: #b57a08;
    color: #fff;
}
.btn-primary:active {
    background-color: #9e6c07 !important;
    border-color: #9e6c07 !important;
}

.btn-outline-primary {
    color: var(--gold);
    border-color: var(--gold);
}
.btn-outline-primary:hover {
    background-color: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

/* =========================================================
   LINKS
   ========================================================= */

a { color: var(--gold); }
a:hover { color: #b57a08; }

/* =========================================================
   TABLE
   ========================================================= */

.table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 700;
    white-space: nowrap;
    color: #555;
}

/* ----- Avatar circle ----- */
.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0e4c0;
    color: #8a5e04;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ----- Role icon badge ----- */
.role-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.role-admin  { background: #fee2e2; color: #dc2626; }
.role-editor { background: #fef9c3; color: #b45309; }
.role-viewer { background: #e0f2fe; color: #0369a1; }

/* =========================================================
   LOGIN PAGE
   ========================================================= */

body.login-page {
    background: #080808;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    min-height: 100vh;
}

/* Two-column container */
.login-box {
    display: flex;
    width: 100%;
    max-width: 860px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,.95), 0 0 0 1px #2a1800;
}

/* ── Left: brand panel ── */
.login-brand {
    flex: 1;
    background: linear-gradient(160deg, #160e00 0%, #0a0600 55%, #1a0e00 100%);
    border-right: 1px solid #2a1500;
    padding: 52px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-brand::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(212,150,10,.13) 0%, transparent 70%);
    pointer-events: none;
}

.login-brand-logo {
    width: 170px;
    height: 170px;
    object-fit: contain;
    margin-bottom: 22px;
    filter: drop-shadow(0 6px 28px rgba(212,150,10,.45));
}

.login-brand h1 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: .02em;
}

.login-brand-tagline {
    color: rgba(212,150,10,.75);
    font-size: 0.80rem;
    font-style: italic;
    margin-bottom: 36px;
}

.login-brand-features {
    list-style: none;
    padding: 0; margin: 0;
    text-align: left;
    width: 100%;
}

.login-brand-features li {
    color: #585858;
    font-size: 0.78rem;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #1e1400;
}

.login-brand-features li:last-child { border-bottom: none; }

.login-brand-features li i {
    color: rgba(212,150,10,.55);
    font-size: 0.8rem;
    width: 14px;
    flex-shrink: 0;
}

/* ── Right: form panel ── */
.login-card {
    flex: 1;
    background: #141414;
    padding: 52px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0;
    width: auto;
    max-width: none;
    box-shadow: none;
    border: none;
}

.login-form-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.login-form-sub {
    color: #4a4a4a;
    font-size: 0.82rem;
    margin-bottom: 28px;
}

.login-card .form-label {
    color: #888;
    font-size: 0.84rem;
}

.login-card .input-group-text {
    background: #1e1e1e;
    border-color: #2d2d2d;
    color: #555;
}

.login-card .form-control {
    background: #1e1e1e;
    border-color: #2d2d2d;
    color: #f0f0f0;
}

.login-card .form-control::placeholder { color: #333; }

.login-card .form-control:focus {
    background: #242424;
    border-color: var(--gold);
    color: #f0f0f0;
    box-shadow: 0 0 0 3px rgba(212,150,10,.15);
}

.btn-login {
    height: 48px;
    font-weight: 700;
    font-size: 0.95rem;
    background: linear-gradient(135deg, var(--gold) 0%, #f0b30a 100%);
    border: none;
    color: #1a0e00;
    letter-spacing: .03em;
    transition: filter 0.2s, transform 0.1s;
}

.btn-login:hover {
    filter: brightness(1.1);
    background: linear-gradient(135deg, var(--gold) 0%, #f0b30a 100%);
    color: #1a0e00;
    transform: translateY(-1px);
}

.btn-login:active { transform: translateY(0); }

.login-footer {
    color: #333 !important;
    border-top-color: #222 !important;
}

/* Responsive: single column on mobile */
@media (max-width: 660px) {
    .login-brand { display: none; }
    .login-box   { border-radius: 16px; }
    .login-card  { padding: 40px 28px; }
}

/* =========================================================
   LGPD
   ========================================================= */

/* Consent checkbox on login */
.lgpd-consent-box {
    background: #1c1c1c;
    border: 1px solid #2d2d2d;
    border-radius: 8px;
    padding: 14px 16px;
}

.lgpd-consent-box .form-check-label {
    color: #888;
}

.lgpd-consent-box a {
    color: var(--gold);
}

.lgpd-consent-box .text-muted {
    color: #444 !important;
}

.lgpd-consent-box .form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

/* Dashboard stat icon */
.lgpd-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

/* Audit dot */
.lgpd-action-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    display: inline-block;
}

/* Base legal cards */
.lgpd-legal-card {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
    height: 100%;
    transition: border-color .15s, box-shadow .15s;
}

.lgpd-legal-card:hover {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-muted);
}

.lgpd-legal-icon {
    font-size: 1.7rem;
    margin-bottom: 6px;
}

.lgpd-legal-art {
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 3px;
}

.lgpd-legal-title {
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e293b;
    margin-bottom: 5px;
}

.lgpd-legal-text {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.45;
}

/* Request type selection cards */
.lgpd-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 12px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    min-height: 95px;
    color: #334155;
}

.lgpd-type-card:hover {
    border-color: var(--gold);
    background: var(--gold-muted);
    color: #7a5000;
}

.lgpd-type-card.selected {
    border-color: var(--gold);
    background: var(--gold-muted);
    color: #7a5000;
}

.lgpd-type-card.lgpd-type-danger:hover,
.lgpd-type-card.lgpd-type-danger.selected {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}
