/* public/assets/css/styles.css — JurisNexus Visual Identity V2 */
:root {
    --primary-color: #1E3A8A;
    /* Azul Jurídico */
    --primary-color-dark: #1e3060;
    --secondary-color: #1E3A8A;
    /* Azul Tech CTA */
    --secondary-color-dark: #1e3060;
    --bg-color: #F8FAFC;
    --sidebar-bg: #ffffff;
    --card-bg: #FFFFFF;
    --gold: #D4AF37;
    --text-main: #0F172A;
    --text-sec: #475569;
    --border-color: #E2E8F0;
    --alert-color: #EF4444;
    /* Vermelho suave */
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Tokens */
body.dark-mode {
    --bg-color: #0F172A;
    --sidebar-bg: #1E293B;
    --card-bg: #1E293B;
    --text-main: #F8FAFC;
    --text-sec: #94A3B8;
    --border-color: #334155;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition), color var(--transition);
}

a {
    transition: color var(--transition);
    color: var(--secondary-color);
}

a:hover {
    color: var(--primary-color);
}

html {
    scroll-behavior: smooth;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}


/* Base Layout Config */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 50;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    opacity: 0.8;
}

/* Main Layout Grid */
.app-content {
    flex-grow: 1;
    margin-left: 280px;
    padding: 2.5rem;
    transition: margin-left var(--transition);
}

/* Sidebar Specifics */
.app-sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    position: fixed;
    top: 70px;
    /* Below Header */
    left: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    border-right: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    transition: transform var(--transition);
    z-index: 40;
}

.sidebar-section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-sec);
    font-weight: 700;
    margin: 1.5rem 0 0.5rem 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin-bottom: 0.25rem;
}

.sidebar-link i {
    width: 24px;
    font-size: 1.1rem;
    color: var(--text-sec);
    margin-right: 10px;
    transition: var(--transition);
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--bg-color);
    color: var(--secondary-color);
    transform: translateX(4px);
}

.sidebar-link:hover i,
.sidebar-link.active i {
    color: var(--secondary-color);
}

/* Page Headers */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h2 {
    font-weight: 800;
    font-size: 1.75rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Dashboard Metrics / Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(37, 99, 235, 0.3);
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-sec);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Generic Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-soft);
    margin-bottom: 1.5rem;
}

.card-header {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

/* Typography Utilities */
.text-primary {
    color: var(--secondary-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--alert-color) !important;
}

.text-muted,
.text-sec {
    color: var(--text-sec) !important;
}

.text-sm {
    font-size: 0.875rem !important;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    border: 1px solid transparent;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color-dark);
    box-shadow: 0 10px 20px rgba(30, 58, 138, 0.2);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}


.btn-outline {
    background: transparent;
    border-color: var(--border-color);
    color: var(--text-sec);
}

.btn-outline:hover {
    background: var(--bg-color);
    color: var(--text-main);
    border-color: var(--text-sec);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--secondary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--alert-color);
}

.badge-info {
    background: rgba(56, 189, 248, 0.1);
    color: #0284c7;
}

.badge-purple {
    background: rgba(168, 85, 247, 0.1);
    color: #7e22ce;
}

.badge-secondary {
    background: var(--border-color);
    color: var(--text-sec);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th,
.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-color);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

body.dark-mode .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Utilities */
.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.p-1 {
    padding: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.active {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .app-content {
        margin-left: 0;
        padding: 1.5rem;
    }


    .d-none-mobile {
        display: none !important;
    }
}