/* ============================================================
   ADVPro - DESIGN SYSTEM CSS & VISUAL IDENTITY
   Elegante, sem Neon, sem Glassmorphism, Cores Vibrantes
   Desenvolvido por SSoftwares Sistemas (by S.M.S.M.)
   ============================================================ */

:root {
    --primary-color: #1e3a8a;
    --primary-hover: #1e40af;
    --accent-gold: #d97706;
    --accent-emerald: #059669;
    --accent-crimson: #dc2626;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
}

/* ============================================================
   SUPORTE COMPLETO AO TEMA ESCURO (DARK MODE OVERRIDE)
   ============================================================ */
html.dark-mode,
body.dark-mode {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

body.dark-mode .min-vh-100,
body.dark-mode div.bg-light,
body.dark-mode main.bg-light,
body.dark-mode main,
body.dark-mode header,
body.dark-mode header.bg-white,
body.dark-mode .bg-light,
body.dark-mode .bg-white,
body.dark-mode .card, 
body.dark-mode .card-custom,
body.dark-mode .modal-content,
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .nav-tabs .nav-link:not(.active),
body.dark-mode .table,
body.dark-mode .table td,
body.dark-mode .table th,
body.dark-mode .list-group-item,
body.dark-mode .accordion-item,
body.dark-mode .dropdown-menu,
body.dark-mode div.border,
body.dark-mode .advpro-footer {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

body.dark-mode div.min-vh-100,
body.dark-mode main {
    background-color: #0f172a !important;
}

body.dark-mode .text-dark,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, 
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6,
body.dark-mode label, body.dark-mode p:not(.text-muted),
body.dark-mode td, body.dark-mode th, body.dark-mode strong {
    color: #f8fafc !important;
}

body.dark-mode .text-muted {
    color: #94a3b8 !important;
}

body.dark-mode .btn-outline-secondary {
    color: #cbd5e1 !important;
    border-color: #475569 !important;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Sidebar & Navigation */
.sidebar {
    width: 260px;
    background: var(--bg-dark);
    min-height: 100vh;
    color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.sidebar .brand {
    padding: 1.5rem 1.25rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .brand span {
    color: var(--accent-gold);
}

.sidebar .nav-link {
    color: #94a3b8;
    padding: 0.85rem 1.25rem;
    font-weight: 500;
    border-radius: 8px;
    margin: 0.2rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.sidebar .nav-link i {
    font-size: 1.2rem;
}

/* Cards Premium */
.card-custom {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-stat {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    color: #ffffff;
}

.card-stat.bg-blue { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.card-stat.bg-emerald { background: linear-gradient(135deg, #047857, #10b981); }
.card-stat.bg-gold { background: linear-gradient(135deg, #b45309, #f59e0b); }
.card-stat.bg-crimson { background: linear-gradient(135deg, #b91c1c, #ef4444); }

.card-stat .icon-bg {
    position: absolute;
    right: 15px;
    bottom: 10px;
    font-size: 4rem;
    opacity: 0.15;
}

/* Custom Signature Pad */
#signature-pad-canvas {
    border: 2px dashed #cbd5e1;
    border-radius: var(--border-radius);
    background-color: #ffffff;
    cursor: crosshair;
    touch-action: none;
}

/* Footer Banner */
.advpro-footer {
    padding: 1.25rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}
