/* ========================================================================
   SISTEMA DE GESTÃO DE BOLETOS v7.0 — STYLE.CSS
   Design moderno, dark theme, totalmente responsivo
   ======================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Cores principais */
    --bg-primary: #0f1419;
    --bg-secondary: #1a2027;
    --bg-tertiary: #232a33;
    --bg-card: #1e252e;
    --bg-input: #2a323d;
    --bg-hover: #2d3540;
    
    --border-color: #2f3744;
    --border-light: #374151;
    
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Accents */
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    --accent-info: #06b6d4;
    --accent-purple: #a855f7;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    
    --sidebar-width: 270px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

/* ============ LOGIN PAGE ============ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f1419 0%, #1a2138 50%, #0f1419 100%);
}

.login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.login-art {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    position: relative;
    overflow: hidden;
}

.login-art::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15) 0%, transparent 50%);
}

.login-art-content { color: white; position: relative; z-index: 1; max-width: 400px; }
.art-logo { font-size: 72px; margin-bottom: 16px; }
.login-art h1 { font-size: 36px; margin-bottom: 12px; font-weight: 800; }
.art-subtitle { font-size: 16px; opacity: 0.95; margin-bottom: 24px; line-height: 1.6; }
.art-features { list-style: none; }
.art-features li {
    padding: 10px 14px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-box {
    width: 100%;
    max-width: 420px;
}

.login-header { margin-bottom: 32px; }
.login-header h2 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.login-header p { color: var(--text-secondary); }

.login-form { margin-bottom: 24px; }

.input-icon {
    position: relative;
}
.input-icon .icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    pointer-events: none;
}
.input-icon input { padding-left: 44px; padding-right: 44px; }
.toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 16px;
}

.login-info-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}
.login-info-box strong { display: block; margin-bottom: 8px; }
.demo-creds { margin: 8px 0; font-family: monospace; font-size: 15px; }
.demo-creds code {
    background: var(--bg-input);
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 8px;
}
.login-info-box small { color: var(--text-muted); }

.login-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ LAYOUT (logado) ============ */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-title { font-weight: 700; font-size: 16px; }
.logo-version { font-size: 12px; color: var(--text-muted); }

.user-card {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { 
    font-weight: 600; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}
.user-role { font-size: 12px; margin-top: 2px; }
.role-superadmin { color: #fbbf24; }
.role-admin { color: var(--accent-info); }
.role-user { color: var(--text-secondary); }

.nav-menu {
    flex: 1;
    padding: 20px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.2s;
    margin-bottom: 4px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(168,85,247,0.2));
    color: white;
    box-shadow: inset 3px 0 0 var(--accent-primary);
}

.nav-icon { font-size: 18px; }

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(239,68,68,0.1);
    color: var(--accent-danger);
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-bottom: 12px;
    transition: all 0.2s;
}
.logout-btn:hover {
    background: var(--accent-danger);
    color: white;
}

.session-info {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--accent-success);
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Botão hamburguer mobile */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 20px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    padding: 32px;
    overflow-x: hidden;
}

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

.page-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

.page-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ============ CARDS ============ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2 { font-size: 20px; font-weight: 700; }
.link-arrow { font-size: 14px; font-weight: 500; }

/* ============ STAT CARDS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stats-grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stats-grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--stat-color, var(--accent-primary));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-blue { --stat-color: var(--accent-primary); }
.stat-green { --stat-color: var(--accent-success); }
.stat-yellow { --stat-color: var(--accent-warning); }
.stat-red { --stat-color: var(--accent-danger); }
.stat-purple { --stat-color: var(--accent-purple); }
.stat-cyan { --stat-color: var(--accent-info); }
.stat-emerald { --stat-color: #34d399; }

.stat-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-body { flex: 1; min-width: 0; }
.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
    color: var(--stat-color, white);
}
.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ============ TABLES ============ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.data-table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child td { border-bottom: none; }

.row-inactive { opacity: 0.55; }

/* Toolbar de filtros */
.table-toolbar {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input {
    flex: 1;
    min-width: 240px;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
}

.filter-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-tag {
    padding: 8px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}
.filter-tag:hover { background: var(--bg-hover); color: white; }
.filter-tag.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* ============ BOLETO CELL ============ */
.boleto-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.boleto-code {
    background: var(--bg-input);
    padding: 4px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent-info);
}

.btn-copy {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.btn-copy:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.05);
}
.btn-copy.copied {
    background: var(--accent-success);
    color: white;
}

/* User cell */
.user-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.user-cell strong { font-weight: 600; }
.user-cell small {
    color: var(--text-muted);
    font-size: 11px;
}

/* Date cell */
.date-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Value */
.value-cell { color: var(--accent-success); font-weight: 700; }

/* ============ TAGS / BADGES ============ */
.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.tag-pendente   { background: rgba(245,158,11,0.18); color: #fbbf24; }
.tag-pago       { background: rgba(16,185,129,0.18); color: var(--accent-success); }
.tag-vencido    { background: rgba(239,68,68,0.18); color: var(--accent-danger); }
.tag-cancelado  { background: rgba(100,116,139,0.18); color: var(--text-muted); }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-superadmin { background: rgba(251,191,36,0.18); color: #fbbf24; }
.badge-admin      { background: rgba(6,182,212,0.18); color: var(--accent-info); }
.badge-user       { background: rgba(100,116,139,0.2); color: var(--text-secondary); }

.badge-mini {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    margin-left: 4px;
    text-transform: uppercase;
}

.lock-info {
    display: inline-block;
    margin-left: 6px;
}

.locked-indicator {
    color: var(--text-muted);
    font-size: 18px;
    cursor: not-allowed;
}

/* Status dots */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.status-online {
    background: var(--accent-success);
    box-shadow: 0 0 8px var(--accent-success);
    animation: pulse 2s infinite;
}
.status-offline { background: var(--text-muted); }

/* ============ FORMS ============ */
.form { width: 100%; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group-full { grid-column: 1 / -1; }

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.form-group label small { color: var(--text-muted); font-weight: 400; }
.form-group label .req { color: var(--accent-danger); }

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 20px 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
textarea { resize: vertical; min-height: 60px; }

.form-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    color: white;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(99,102,241,0.4);
    color: white;
}

.btn-success { background: var(--accent-success); color: white; }
.btn-warning { background: var(--accent-warning); color: white; }
.btn-danger  { background: var(--accent-danger); color: white; }
.btn-info    { background: var(--accent-info); color: white; }
.btn-ghost   { background: transparent; border: 1px solid var(--border-color); color: var(--text-secondary); }

.btn-success:hover, .btn-warning:hover, .btn-danger:hover, .btn-info:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}
.btn-ghost:hover { background: var(--bg-hover); color: white; }

.btn-sm {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-block { width: 100%; }

.action-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* ============ ALERTS ============ */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    font-weight: 500;
    border-left: 4px solid;
}
.alert-success {
    background: rgba(16,185,129,0.1);
    color: #6ee7b7;
    border-color: var(--accent-success);
}
.alert-error {
    background: rgba(239,68,68,0.1);
    color: #fca5a5;
    border-color: var(--accent-danger);
}
.alert-warning {
    background: rgba(245,158,11,0.1);
    color: #fcd34d;
    border-color: var(--accent-warning);
}

.info-box {
    background: rgba(6,182,212,0.08);
    border-left: 4px solid var(--accent-info);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--text-primary);
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.6; }
.empty-state h3 { font-size: 18px; margin-bottom: 8px; }
.empty-state p { color: var(--text-secondary); }

/* ============ TABS ============ */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 12px 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    font-family: inherit;
    transition: all 0.2s;
}
.tab:hover { color: white; }
.tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ INFO GRID ============ */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.info-item {
    background: var(--bg-input);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.info-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.info-value {
    font-size: 16px;
    font-weight: 600;
}
.info-value small { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); margin-top: 2px; }

/* ============ TREE (HIERARQUIA) ============ */
.hierarchy-tree { display: flex; flex-direction: column; gap: 16px; }

.tree-node {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.tree-header {
    padding: 18px 22px;
    background: linear-gradient(90deg, rgba(99,102,241,0.08), transparent);
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid var(--border-color);
}

.tree-avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.tree-info { flex: 1; }
.tree-name {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.tree-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.tree-children {
    padding: 12px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tree-leaf {
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid var(--accent-primary);
}

.leaf-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.leaf-name { font-weight: 600; }
.leaf-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.tree-empty {
    padding: 14px 22px;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
    text-align: center;
}

/* ============ MODAL ============ */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.modal-warning {
    border-top: 4px solid var(--accent-warning);
}

.modal-icon { font-size: 56px; margin-bottom: 16px; }
.modal-content h2 { font-size: 22px; margin-bottom: 12px; }
.modal-content p { color: var(--text-secondary); margin-bottom: 24px; }
.modal-content strong {
    color: var(--accent-warning);
    font-size: 24px;
    display: inline-block;
    min-width: 36px;
}

/* ============ UTILITIES ============ */
.text-muted { color: var(--text-muted); }
.text-red { color: var(--accent-danger); }
.text-yellow { color: var(--accent-warning); }
.text-green { color: var(--accent-success); }

code {
    background: var(--bg-input);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .login-wrapper { grid-template-columns: 1fr; }
    .login-art { display: none; }
}

@media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
    
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 280px;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    body.sidebar-open .sidebar { left: 0; }
    body.sidebar-open .sidebar-overlay { display: block; }
    
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    
    .main-content { padding: 70px 16px 30px; }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-title { font-size: 22px; }
    
    .stats-grid { grid-template-columns: 1fr; }
    
    .stat-value { font-size: 22px; }
    
    .form-grid { grid-template-columns: 1fr; }
    
    .card { padding: 18px; }
    
    .tabs { overflow-x: auto; }
    .tab { white-space: nowrap; padding: 10px 14px; font-size: 13px; }
    
    .tree-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .main-content { padding: 70px 12px 20px; }
    .card { padding: 14px; }
    .stat-card { padding: 16px; gap: 12px; }
    .stat-icon { width: 48px; height: 48px; font-size: 24px; }
    .stat-value { font-size: 20px; }
    .btn { padding: 9px 16px; font-size: 13px; }
    .data-table th, .data-table td { padding: 10px 8px; font-size: 12px; }
    .boleto-code { font-size: 10px; padding: 2px 6px; }
    .filter-input { min-width: 100%; }
}
