/* ======================================================
   DLP Manager — Design System Premium v3.0
   Fonte: Inter (Google Fonts)
   Estilo: Dark sidebar + Light/Glass content
   Responsivo: Mobile-first
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────── */
:root {
    --primary:        #0f172a;
    --primary-light:  #1e293b;
    --accent:         #3b82f6;
    --accent-dark:    #1d4ed8;
    --accent-glow:    rgba(59, 130, 246, 0.25);
    --bg:             #f0f4f8;
    --surface:        #ffffff;
    --surface-2:      #f8fafc;
    --text:           #1e293b;
    --text-muted:     #64748b;
    --text-light:     #94a3b8;
    --border:         #e2e8f0;
    --border-focus:   #3b82f6;
    --success:        #10b981;
    --danger:         #ef4444;
    --warning:        #f59e0b;
    --info:           #3b82f6;
    --sidebar-w:      256px;
    --sidebar-w-sm:   72px;
    --topbar-h:       64px;
    --radius-sm:      6px;
    --radius:         10px;
    --radius-lg:      16px;
    --radius-xl:      24px;
    --shadow-xs:      0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:      0 2px 8px rgba(0,0,0,.08);
    --shadow:         0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:      0 8px 32px rgba(0,0,0,.14);
    --shadow-xl:      0 20px 60px rgba(0,0,0,.18);
    --transition:     0.22s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 0.875rem;
    -webkit-font-smoothing: antialiased;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* ── Typography ─────────────────────────────────────── */
h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
h2 { font-size: 1.2rem; font-weight: 600; color: var(--text); }
h3 { font-size: 1rem; font-weight: 600; color: var(--text); }
p  { color: var(--text-muted); margin-top: 0; }
a  { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
code {
    font-family: ui-monospace, SFMono-Regular, monospace;
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ── App Layout ─────────────────────────────────────── */
.app-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ── Sidebar ────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #0f172a 0%, #1a2540 100%);
    color: white;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width var(--transition);
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    z-index: 100;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 1px; height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,.06) 0%, transparent 100%);
}

.sidebar.collapsed { width: var(--sidebar-w-sm); }

/* Sidebar Header */
.sidebar-header {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-header { padding: 0; justify-content: center; }

.sidebar-brand-icon {
    font-size: 1.25rem;
    color: var(--accent);
    min-width: 24px;
    text-align: center;
    margin-right: 0.875rem;
    filter: drop-shadow(0 0 8px var(--accent-glow));
}

.sidebar.collapsed .sidebar-brand-icon { margin-right: 0; }

.sidebar-brand-text {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: white;
    opacity: 1;
    transition: opacity var(--transition);
    line-height: 1.2;
}

.sidebar.collapsed .sidebar-brand-text { opacity: 0; width: 0; display: none; }

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.sidebar-section-label {
    padding: 0 1.25rem;
    margin: 1.25rem 0 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.3);
    transition: opacity var(--transition);
}

.sidebar.collapsed .sidebar-section-label { opacity: 0; display: none; }

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.6875rem 1.25rem;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    transition: all var(--transition);
    font-weight: 500;
    font-size: 0.8125rem;
    position: relative;
    border-radius: 0;
    margin: 1px 6px;
    border-radius: var(--radius-sm);
}

.sidebar.collapsed .nav-item { padding: 0.6875rem 0; justify-content: center; margin: 1px 4px; }

.nav-item:hover {
    background: rgba(255,255,255,.07);
    color: white;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(59,130,246,.2) 0%, rgba(59,130,246,.08) 100%);
    color: white;
    border-left: none;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    background: var(--accent);
    border-radius: 0 3px 3px 0;
}

.sidebar.collapsed .nav-item.active::before { display: none; }

.nav-icon {
    width: 20px;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 0.9375rem;
    flex-shrink: 0;
}

.sidebar.collapsed .nav-icon { margin-right: 0; }

.nav-text { transition: opacity var(--transition); }
.sidebar.collapsed .nav-text { opacity: 0; width: 0; display: none; }

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-footer { padding: 0.75rem 0.5rem; }

.user-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.625rem;
    background: rgba(255,255,255,.04);
}

.user-avatar {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, var(--accent), #7c3aed);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    flex-shrink: 0;
    color: white;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar.collapsed .user-info { justify-content: center; }
.sidebar.collapsed .user-name { display: none; }

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem;
    color: rgba(255,255,255,.5);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,.1);
    transition: all var(--transition);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(239,68,68,.15);
    color: #fca5a5;
    border-color: rgba(239,68,68,.3);
}

.sidebar.collapsed .logout-btn span { display: none; }

/* ── Main Content ────────────────────────────────────── */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
    min-width: 0;
}

/* Top Bar */
.top-bar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
    z-index: 10;
}

.top-bar-left { display: flex; align-items: center; gap: 1rem; }
.top-bar-right { display: flex; align-items: center; gap: 0.75rem; }

#sidebarToggle {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.875rem;
}

#sidebarToggle:hover { background: var(--surface-2); color: var(--text); }

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

.breadcrumbs .separator { color: var(--border); }
.breadcrumbs .current { color: var(--text); font-weight: 600; }

/* Content Scrollable Area */
.content-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 1.75rem;
}

.content-scrollable::-webkit-scrollbar { width: 6px; }
.content-scrollable::-webkit-scrollbar-track { background: transparent; }
.content-scrollable::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.content-scrollable::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Cards ──────────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-sm); }

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

/* ── Tables ─────────────────────────────────────────── */
.table-container {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.responsive-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table { width: 100%; border-collapse: collapse; }

thead { background: var(--surface-2); }

th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--text);
    border-bottom: 1px solid #f8fafc;
    vertical-align: middle;
}

tr:hover td { background: #fafbff; }
tr:last-child td { border-bottom: none; }

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 1px 3px rgba(59,130,246,.3);
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,.4);
}
.btn-primary:active:not(:disabled) { transform: translateY(0); }

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--surface-2);
    border-color: #cbd5e1;
    color: var(--primary);
}

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #dc2626; transform: translateY(-1px); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #059669; transform: translateY(-1px); }

.btn-outline {
    background: transparent;
    border-color: var(--border);
    color: var(--text-muted);
}
.btn-outline:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(59,130,246,.05);
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn-sm  { padding: 0.35rem 0.75rem; font-size: 0.75rem; }
.btn-lg  { padding: 0.75rem 1.5rem; font-size: 0.9375rem; }
.btn-xl  { padding: 0.875rem 2rem; font-size: 1rem; font-weight: 700; }
.btn-icon { padding: 0.5rem; width: 34px; height: 34px; border-radius: var(--radius-sm); }
.w-full  { width: 100%; justify-content: center; }

/* ── Badges ─────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
}

.badge-success { background: #ecfdf5; color: #059669; }
.badge-danger  { background: #fef2f2; color: #dc2626; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-info    { background: #eff6ff; color: #2563eb; }
.badge-muted   { background: #f1f5f9; color: #64748b; }
.badge-count   { background: #fef2f2; color: #dc2626; font-size: 0.625rem; }

/* ── Status Dot ─────────────────────────────────────── */
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.status-dot.online  { background: var(--success); box-shadow: 0 0 0 2px rgba(16,185,129,.2); }
.status-dot.offline { background: var(--danger); }
.status-dot.warning { background: var(--warning); }

/* ── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text);
}

.form-hint {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--surface-2);
    color: var(--text);
    transition: all var(--transition);
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%2364748b' d='M7 7l3-3 3 3m0 6l-3 3-3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 16px; padding-right: 2.5rem; }

.form-control-sm { padding: 0.4rem 0.7rem; font-size: 0.8125rem; }

.input-group { position: relative; }

.input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    font-size: 0.875rem;
    z-index: 1;
}

.input-group .form-control { padding-left: 2.5rem; }

.input-icon-right {
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    cursor: pointer;
    font-size: 0.875rem;
    z-index: 1;
    background: none;
    border: none;
    padding: 0;
}

/* ── Alerts / Flash Messages ─────────────────────────── */
.flash-messages {
    position: fixed;
    top: calc(var(--topbar-h) + 1rem);
    right: 1.25rem;
    z-index: 9999;
    width: 360px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    background: white;
    border-left: 4px solid var(--info);
    animation: slideIn 0.3s cubic-bezier(0.34,1.56,0.64,1);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text);
}

.alert-success { border-left-color: var(--success); }
.alert-error   { border-left-color: var(--danger); }
.alert-warning { border-left-color: var(--warning); }

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* Info Banner */
.info-banner {
    background: linear-gradient(90deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: #1e40af;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Actions Bar */
.actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ── Toggle Switch ───────────────────────────────────── */
.toggle-switch { position: relative; display: inline-block; width: 42px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute; inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    cursor: pointer;
    transition: .3s cubic-bezier(0.4,0,0.2,1);
}

.slider::before {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    transition: .3s cubic-bezier(0.4,0,0.2,1);
}

input:checked + .slider { background: var(--success); }
input:checked + .slider::before { transform: translateX(20px); }
input:focus  + .slider { box-shadow: 0 0 0 3px rgba(16,185,129,.2); }

/* ── Pagination Buttons ──────────────────────────────── */
.btn-page {
    background: white;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition);
}

.btn-page:hover { background: var(--surface-2); color: var(--primary); }
.btn-page.active { background: var(--accent); color: white; border-color: var(--accent); }

/* ── Loading Overlay ─────────────────────────────────── */
#loading-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.65);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    flex-direction: column;
    gap: 1rem;
    color: white;
}

.spinner {
    width: 44px; height: 44px;
    border: 3px solid rgba(255,255,255,.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
#loading-overlay span { font-size: 0.9rem; font-weight: 500; opacity: 0.85; }

/* ── Utilities ───────────────────────────────────────── */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: 0.8125rem; }
.text-xs     { font-size: 0.75rem; }
.text-muted  { color: var(--text-muted); }
.text-light  { color: var(--text-light); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.font-mono   { font-family: ui-monospace, SFMono-Regular, monospace; }
.font-bold   { font-weight: 700; }
.font-semibold { font-weight: 600; }
.truncate    { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-flex      { display: flex; }
.align-center { align-items: center; }
.gap-1       { gap: 0.5rem; }
.gap-2       { gap: 1rem; }
.mt-1        { margin-top: 0.5rem; }
.mt-2        { margin-top: 1rem; }
.mb-1        { margin-bottom: 0.5rem; }
.mb-2        { margin-bottom: 1rem; }

/* ── Auth Pages ──────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0; left: 0;
    z-index: 9999;
    overflow: hidden;
}

/* Left panel - decorativo */
.auth-panel-left {
    flex: 0 0 45%;
    background: linear-gradient(145deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,.25) 0%, transparent 70%);
    top: 10%; left: 10%;
    animation: pulse-glow 4s ease-in-out infinite;
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
    bottom: 15%; right: 5%;
    animation: pulse-glow 4s ease-in-out infinite 2s;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%       { transform: scale(1.2); opacity: 1; }
}

.auth-brand {
    position: relative;
    z-index: 1;
    text-align: center;
    color: white;
}

.auth-brand-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 20px rgba(59,130,246,.5));
}

.auth-brand-name {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 30%, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-brand-tagline {
    font-size: 0.9rem;
    color: rgba(255,255,255,.5);
    max-width: 280px;
}

.auth-features {
    position: relative;
    z-index: 1;
    margin-top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    width: 100%;
    max-width: 300px;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255,255,255,.65);
    font-size: 0.8125rem;
    font-weight: 500;
}

.auth-feature-item i {
    width: 28px; height: 28px;
    background: rgba(59,130,246,.15);
    border: 1px solid rgba(59,130,246,.2);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: #60a5fa;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Right panel - formulário */
.auth-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    overflow-y: auto;
    padding: 2rem;
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 2rem;
}

.auth-form-header h1 {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.375rem;
}

.auth-form-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-form-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
}

.auth-divider {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    margin: 1.25rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    background: white;
    padding: 0 0.75rem;
    position: relative;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* MFA OTP Input */
.otp-input {
    text-align: center;
    letter-spacing: 0.5em;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: ui-monospace, monospace;
}

/* QR Code */
.qr-wrapper {
    display: inline-flex;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin: 1rem auto;
}

.qr-code-responsive { max-width: 200px; width: 100%; height: auto; display: block; }

/* ── Responsividade Mobile ───────────────────────────── */
@media (max-width: 1024px) {
    .auth-panel-left { display: none; }
    .auth-panel-right { flex: 1; }
}

@media (max-width: 768px) {
    body { overflow: hidden; }

    .auth-panel-right { padding: 1.25rem; }
    .auth-form-card { padding: 1.5rem; border-radius: var(--radius); }

    .content-scrollable { padding: 1rem; }

    .top-bar { padding: 0 1rem; }

    .flash-messages { width: calc(100vw - 2rem); right: 1rem; }

    /* Sidebar vira overlay no mobile */
    .sidebar {
        position: fixed !important;
        left: -100%;
        top: 0; bottom: 0;
        z-index: 1000;
        transition: left var(--transition);
    }

    .sidebar.mobile-open { left: 0; }

    .sidebar-overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,.5);
        z-index: 999;
    }

    .sidebar-overlay.mobile-open { display: block; }

    .actions-bar { flex-direction: column; align-items: stretch; }
    .actions-bar div { width: 100%; }

    table { font-size: 0.75rem; }
    th, td { padding: 0.6rem 0.75rem; }
}

@media (max-width: 480px) {
    .auth-form-card { padding: 1.25rem; }
    .auth-form-container { max-width: 100%; }
    h1 { font-size: 1.25rem; }
}

/* ── Mobile top menu button ──────────────────────────── */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem; left: 1rem;
    z-index: 1001;
    width: 40px; height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
}

/* ── Scrollbar Global ────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ── Misc ────────────────────────────────────────────── */
.separator { height: 1px; background: var(--border); margin: 1.25rem 0; }

.container { max-width: 1400px; margin: 0 auto; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}