/* public/assets/css/style.css */

/* --- CORE CSS (Privian Deep Blue & Gold Theme) --- */
:root {
    --primary-color: #b08d55;
    /* Gold/Bronze */
    --primary-dark: #8a6d3b;
    --primary-light: #d4b47e;

    --secondary-color: #051d40;
    /* Deep Dark Blue */
    --secondary-light: #162f56;

    --bg-color: #f2f2f2;
    --card-bg: #ffffff;

    --text-color: #333333;
    --text-muted: #666666;
    --text-on-dark: #ffffff;

    --border-radius: 6px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

    --top-bar-height: 0px;
    --navbar-height: 80px;
}

/* Typography Helpers (Dark Mode Support) */
.text-brand-primary {
    color: var(--secondary-color);
}

.text-brand-accent {
    color: var(--primary-color);
}

[data-theme="dark"] .text-brand-primary {
    color: #ffffff !important;
}

[data-theme="dark"] .text-brand-accent {
    color: #d4b47e;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --text-on-dark: #ffffff;
    --secondary-color: #e0e0e0;
    /* Light Gray */
    /* Adjusted for better contrast on dark */
    /* Keep primary gold/bronze as it often works well or slightly adjust */
    --primary-color: #d4b47e;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);

    /* Input backgrounds */
    --input-bg: #2d2d2d;
    --border-color: #404040;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    padding-top: calc(var(--top-bar-height) + var(--navbar-height));
    /* Space for fixed headers */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
    margin: 0;
}

/* --- THEME TOGGLE --- */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-color);
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

[data-theme="dark"] .theme-toggle-btn {
    color: #f1c40f;
    /* Sun icon yellow */
}

/* --- TOP BAR (Social & Info) --- */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--top-bar-height);
    background-color: var(--secondary-color);
    color: var(--text-on-dark);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Align left as requested */
}

/* Ensure text is visible on Light Gray Top Bar in Dark Mode */
[data-theme="dark"] .top-bar,
[data-theme="dark"] .top-bar-social a {
    color: #121212 !important;
    /* Dark text on light gray bar */
}

/* Ensure secondary buttons (using light gray) have dark text in dark mode */
[data-theme="dark"] .btn-secondary {
    color: #121212 !important;
}

/* Orphaned styles removed */

.top-bar-social {
    display: flex;
    gap: 15px;
}

.top-bar-social a {
    color: var(--text-on-dark);
    opacity: 0.8;
}

.top-bar-social a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* --- NAVBAR --- */
.navbar {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background-color: var(--card-bg);
    /* Use variable */
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1001;
    box-sizing: border-box;
}

/* Text Utilities & Dark Mode Overrides */
.text-success {
    color: #27ae60 !important;
}

.text-danger {
    color: #c0392b !important;
}

[data-theme="dark"] .text-success,
[data-theme="dark"] .text-danger,
[data-theme="dark"] .stat-value,
[data-theme="dark"] .stat-label,
[data-theme="dark"] .card-header,
[data-theme="dark"] th {
    color: #e0e0e0 !important;
    /* Force Light Gray as requested */
}

[data-theme="dark"] .navbar {
    background-color: var(--card-bg) !important;
}

[data-theme="dark"] .stat-card {
    background-color: var(--card-bg) !important;
    border-color: var(--border-color) !important;
}

/* Specific Override for Vencimentos Card Background in Dark Mode */
[data-theme="dark"] .upcoming-expirations-card.has-alerts {
    background-color: #3e2723 !important;
    /* Dark Red/Brown hint */
    border-color: #c62828 !important;
}

.navbar-brand-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logo Image styling placeholder if they have one, otherwise text */
.navbar-brand-logo {
    height: 40px;
    width: auto;
}

.navbar-brand-text {
    font-size: 1.4rem;
    font-weight: 300;
    /* Thin sleek font */
    color: #333;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.brand-separator {
    color: #ccc;
    margin: 0 10px;
    font-size: 1.1rem;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: #666;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    line-height: 1;
    text-align: left;
    margin-left: 5px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 25px;
}

.navbar-menu li a {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 50px;
    position: relative;
    display: inline-flex;
    align-items: center;
    line-height: normal;
    gap: 8px;
    transition: all 0.3s ease;
}

.navbar-menu li a i {
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 0.9rem;
}

/* Remove old underline */
.navbar-menu li a::after {
    display: none;
}

/* Pill Hover State */
.navbar-menu li a:hover {
    background-color: rgba(176, 141, 85, 0.1);
    color: var(--primary-color);
    transform: translateY(-1px);
}

/* Pill Active State */
.navbar-menu li a.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(176, 141, 85, 0.3);
}

/* Ensure icons inherit color properly in active state */
.navbar-menu li a.active i {
    color: white;
}

/* Adjust gap/spacing in navbar */
.navbar-menu {
    gap: 10px;
    /* Tighter gap since pills have padding */
}

/* Specific button in navbar (Like "Fale com um especialista") */
.nav-cta-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 8px 20px !important;
    /* Reduced from 10px 25px */
    border-radius: 50px;
    transition: background 0.3s;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    /* Reduced from 0.85rem */
    letter-spacing: 0.5px;
}

.nav-cta-btn:hover {
    background-color: var(--primary-dark);
    color: white !important;
}

.nav-cta-btn::after {
    display: none !important;
    /* No underline for button */
}

/* --- MAIN CONTENT --- */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 90%;
    padding: 30px 0;
    flex: 1;
    /* Pushes footer to bottom */
}

/* --- CARDS --- */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
    border: 1px solid var(--border-color, #eef0f5);
    /* Subtle border */
    /* Removed top stripe for cleaner look, or keep it subtle */
    /* border-top: 3px solid var(--primary-color); */
}

.card-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color, #eee);
    padding-bottom: 10px;
}

/* --- FORMS --- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border 0.3s;
    background-color: var(--input-bg, #fafafa);
    color: var(--text-color);
    white-space: pre-wrap;
    word-wrap: break-word;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(176, 141, 85, 0.2);
}

input[readonly] {
    background-color: #f0f0f0;
    color: #777;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    /* Match image rounding */
    cursor: pointer;
    font-size: 1rem;
    /* Restore to 1rem for better legibility matching image */
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    gap: 10px;
    /* Slightly more space between icon and text */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Softer initial shadow */
    height: 40px;
    /* Increased height to match the 'chunky' look in image */
    white-space: nowrap;
    box-sizing: border-box;
    /* Ensure padding doesn't add to height */
    font-family: inherit;
    /* Ensure buttons inherit font */
}

.btn:hover {
    transform: translateY(-3px);
    /* Pronounced lift */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* Enhanced shadow */
    filter: brightness(1.05);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    /* Transform handled by generic .btn:hover */
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-light);
}


.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    box-shadow: none;
    /* Outlines usually don't have shadow until hover */
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(176, 141, 85, 0.3);
}

.btn-danger {
    background-color: #d32f2f;
    color: white;
}

.btn-danger:hover {
    background-color: #b71c1c;
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.3);
}

/* Button Group Helper for Headers */
.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* --- TABLES --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
}

th,
td {
    padding: 12px 15px;
    /* Slightly reduced top/bottom padding for compactness */
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    /* Prevent line breaks as requested */
    vertical-align: middle;
    /* Ensure harmony */
}

th {
    background-color: #f8f9fa;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #fcfcfc;
}

/* Zebra Striping */
tbody tr:nth-child(even) {
    background-color: #F7F7F7;
}

tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

/* Ensure hover is still visible/distinct over the gray rows */
tbody tr:hover {
    background-color: #f0f0f0 !important;
    /* Slightly darker than F7F7F7 */
}

tbody tr:hover td {
    background-color: transparent;
    /* Let row background show through */
}

/* --- DASHBOARD WIDGETS --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 10px 0 5px 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-icon {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2.5rem;
    color: rgba(0, 0, 0, 0.05);
}

/* --- STATUS BADGES --- */
.badge {
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-ativa {
    background: #e6fffa;
    color: #047481;
}

.badge-cancelada {
    background: #fff5f5;
    color: #c53030;
}

.badge-renovada {
    background: #ebf8ff;
    color: #2b6cb0;
}

.badge-proposta {
    background: #fffaf0;
    color: #ed8936;
}

.badge-vencida {
    background: #f5f5f5;
    color: #616161;
    border: 1px solid #e0e0e0;
}

/* --- FOOTER --- */
.footer {
    background-color: var(--secondary-color);
    color: var(--text-on-dark);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.9;
}

.footer-content {
    max-width: 98%;
    /* Match main content */
    margin: 0 auto;
    width: 98%;
}

/* --- MAIN CONTENT --- */
.main-content {
    max-width: 98%;
    /* Increased from 1200px to avoid horizontal scroll */
    margin: 0 auto;
    width: 98%;
    padding: 30px 0;
    flex: 1;
    /* Pushes footer to bottom */
}

/* --- GRIDSTACK DASHBOARD --- */
.grid-stack {
    background: transparent;
}

.grid-stack-item-content {
    background: transparent;
}

/* Ensure cards take full height of content wrapper */
.grid-stack-item-content .stat-card {
    height: 100%;
    margin-bottom: 0;
    /* Gridstack handles spacing */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card {
    cursor: grab;
    transition: box-shadow 0.2s;
}

.stat-card:active {
    cursor: grabbing;
}

/* --- EXPIRATION NOTIFICATION --- */
.expiration-notification {
    background-color: #fff1f0;
    /* Light pink background */
    border-radius: 20px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.15);
    /* Soft reddish shadow */
    margin-bottom: 20px;
    max-width: fit-content;
    border: 1px solid rgba(231, 76, 60, 0.1);
}

.expiration-icon-box {
    width: 48px;
    height: 48px;
    background-color: #e74c3c;
    /* Strong Red */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.expiration-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.expiration-title {
    color: #c0392b;
    /* Darker Red Text */
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.expiration-subtitle {
    color: #e74c3c;
    font-weight: 600;
    font-size: 1rem;
}

/* --- BIRTHDAY NOTIFICATION --- */
.birthday-notification {
    background-color: #fef9e7;
    /* Light yellow background */
    border-radius: 20px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(241, 196, 15, 0.15);
    /* Soft yellow/gold shadow */
    margin-bottom: 20px;
    max-width: fit-content;
    border: 1px solid rgba(241, 196, 15, 0.2);
}

.birthday-icon-box {
    width: 48px;
    height: 48px;
    background-color: #f1c40f;
    /* Vibrant Gold */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(241, 196, 15, 0.3);
}

.birthday-title {
    color: #9a7d0a;
    /* Darker Gold Text */
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.birthday-subtitle {
    color: #d4ac0d;
    /* Medium Gold */
    font-weight: 600;
    font-size: 1rem;
}

/* --- CUSTOM GRID & UTILITIES (Replacing Bootstrap) --- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

[class^="col-"] {
    position: relative;
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
    box-sizing: border-box;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-md-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .offset-md-1 {
        margin-left: 8.333333%;
    }
}

/* Utilities */
.d-flex {
    display: flex !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.flex-column {
    flex-direction: column !important;
}

.gap-3 {
    gap: 1rem !important;
}

/* --- DASHBOARD SPECIFIC LAYOUT --- */
.dash-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

.dash-col {
    position: relative;
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
    box-sizing: border-box;
}

.dash-col-50 {
    flex: 0 0 50%;
    max-width: 50%;
}

.dash-col-100 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .dash-col-50 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
}

/* Utilities reused */
.mb-2 {
    margin-bottom: 0.5rem !important;
}


.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.m-0 {
    margin: 0 !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.pl-0 {
    padding-left: 0 !important;
}

.pl-1 {
    padding-left: 0.25rem !important;
}

.pr-0 {
    padding-right: 0 !important;
}

.h-100 {
    height: 100% !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-primary {
    color: #007bff !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

.text-uppercase {
    text-transform: uppercase !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.bg-white {
    background-color: #ffffff !important;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0, 0, 0, .075) !important;
}

.border-0 {
    border: 0 !important;
}

.border {
    border: 1px solid #dee2e6 !important;
}

.rounded {
    border-radius: 0.25rem !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
}

.table-sm th,
.table-sm td {
    padding: 0.3rem
}

.table-borderless th,
.table-borderless td,
.table-borderless thead th,
.table-borderless tbody+tbody {
    border: 0;
}

.w-100 {
    width: 100% !important;
}

/* --- TIMELINE --- */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding-left: 30px;
    margin-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: -30px;
    /* Connect to next item */
    width: 2px;
    background-color: #e9ecef;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-marker {
    position: absolute;
    left: -5px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 0 0 1px #e9ecef;
    z-index: 1;
}

.timeline-content {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-content:hover {
    transform: translateX(2px);
    box-shadow: var(--box-shadow);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.timeline-body {
    color: var(--text-color);
    line-height: 1.5;
}

/* --- ACTION ICONS (Interactive Contact Icons) --- */
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy effect */
    text-decoration: none !important;
    vertical-align: middle;
}

.action-icon:hover {
    transform: scale(1.3);
    filter: brightness(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background-color: rgba(0, 0, 0, 0.05);
    /* Subtle background for better focus */
}

/* --- RESPONSIVE NAVBAR & GRID --- */

/* Responsive Grid Utility */
.grid-responsive {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .grid-responsive {
        grid-template-columns: 1fr 1fr;
        margin-top: 50px;
    }
}

/* Navbar Toggle Button (Hidden on Desktop) */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 10px;
}

/* Turbo Compact menu for laptops */
.navbar-menu {
    gap: 5px;
}

.navbar-menu li a {
    padding: 5px 8px;
    /* Very compact */
    font-size: 0.75rem;
    /* Smaller font */
}

/* Navbar Container Tweak for Laptops */
@media (min-width: 992px) {
    .navbar {
        flex-wrap: nowrap;
        /* Prevent wrapping on desktop */
        padding: 0 15px;
        /* Reduce side padding to gain space */
    }
}

/* Laptop/Desktop Optimizations (992px - 2000px) */
/* Ensure text is VISIBLE but compact to fit with menu */
@media (max-width: 2000px) {
    .navbar-brand-text div {
        display: flex !important;
        /* Show text */
        font-size: 1rem;
        /* Readable but compact size */
        white-space: nowrap;
    }

    .navbar-brand-text img {
        height: 40px !important;
    }
}

/* Very Small Laptops / Detail adjustment */
@media (max-width: 1366px) {
    .navbar-brand-text div {
        font-size: 0.85rem;
        /* Slightly smaller for 1366 screens */
    }
}

/* Hamburger for smaller screens */
@media (max-width: 1300px) {
    .navbar {
        height: auto;
        min-height: var(--navbar-height);
        flex-wrap: wrap;
        /* Allow wrapping for mobile menu */
        padding: 10px 5%;
    }

    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding: 20px 0;
        border-top: 1px solid #eee;
        margin-top: 10px;
    }

    /* JavaScript will toggle this class */
    .navbar-menu.active {
        display: flex;
    }

    .navbar-menu li {
        width: 100%;
    }

    .navbar-menu li a {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 20px;
        border-radius: 8px;
        /* Less pill-shaped on mobile */
    }

    /* Adjust notifications dropdown position for mobile */
    #notif-menu,
    .dropdown-menu {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: 1px solid #eee !important;
        margin-top: 10px;
    }

    /* Adapt Logo */
    .navbar-brand-text img {
        height: 35px !important;
    }

    .navbar-brand-text {
        font-size: 1.1rem;
    }
}

/* --- PRINT STYLES (Professional Reports) --- */
@media print {
    body {
        padding-top: 0 !important;
        background-color: white !important;
    }

    .top-bar,
    .navbar,
    .footer,
    .sidebar,
    .no-print,
    .d-print-none,
    .pagination-container,
    .btn,
    .filter-bar,
    form,
    .modal-footer,
    .breadcrumb {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 0 !important;
    }

    .card-header {
        border-bottom: 2px solid #333 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .main-content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    table {
        font-size: 10px !important;
        width: 100% !important;
        border-collapse: collapse !important;
    }

    th,
    td {
        border: 1px solid #dee2e6 !important;
        padding: 4px 8px !important;
    }

    th {
        background-color: #f8f9fa !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    tr {
        page-break-inside: avoid;
    }

    /* Keep text black for better printing */
    * {
        color: #000 !important;
        text-shadow: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .text-success,
    .text-danger,
    .badge {
        color: #000 !important;
        border: 1px solid #ccc !important;
        background: none !important;
    }
}