:root {
    --primary-color: #2f506e; /* Your new Brand Color */
    --secondary-color: #64748b;
    --accent-color: #4f46e5; /* For buttons/highlights */
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-color: #1f2937;
}

/* STICKY FOOTER SETUP */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    
    /* This makes the footer stick to the bottom */
    display: flex;
    flex-direction: column;
    min-height: 100vh; 
    padding-top: 80px; /* Increased padding for larger header */
}

/* This pushes the footer down */
.container, .container-fluid {
    flex: 1;
}

/* HEADER / NAVBAR */
.navbar-custom {
    background-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 10px 0; /* Add breathing room */
}

.navbar-brand img {
    height: 60px; /* Bigger Logo */
    width: auto;
    transition: transform 0.2s;
}

.navbar-brand img:hover {
    transform: scale(1.05); /* Subtle zoom on hover */
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important; /* White text */
    font-weight: 500;
    margin: 0 5px;
    padding: 8px 15px !important;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 10px;
}

/* CARDS & TABLES */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: var(--card-bg);
    margin-bottom: 20px;
}

.table thead th {
    background-color: #f8fafc;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    border-bottom: 2px solid #e2e8f0;
}

/* FOOTER */
#footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 20px 0;
    margin-top: auto; /* Critical for sticky footer */
    font-size: 0.9rem;
    border-top: 4px solid rgba(0,0,0,0.1);
}

#footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

#footer a:hover {
    text-decoration: underline;
    opacity: 0.9;
}

/* UTILITIES */
.text-primary-custom { color: var(--primary-color); }
.btn-primary { 
    background-color: var(--primary-color); 
    border-color: var(--primary-color); 
}
.btn-primary:hover { 
    background-color: #1e3a52; /* Darker shade of your color */
    border-color: #1e3a52; 
}

/* --- CUSTOM DATA TABLE STYLING --- */

/* 1. The Container */
.table-responsive {
    border-radius: 0.75rem;
    overflow: hidden; /* Keeps borders clean */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* 2. Sticky Header (Keeps titles visible while scrolling) */
.table-custom thead th {
    position: sticky;
    top: 0;
    background-color: var(--primary-color); /* Use your Dark Blue Theme */
    color: #ffffff; /* White text for contrast */
    z-index: 2; /* Ensures it stays on top */
    border-bottom: none;
    padding: 15px; /* More breathing room */
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* 3. Zebra Striping (The Blue Tint) */
/* Alternating rows get a very subtle blue tint (5% opacity of your theme color) */
.table-custom tbody tr:nth-of-type(even) {
    background-color: rgba(47, 80, 110, 0.06); 
}

/* 4. Hover Effect (Darker blue when mouse moves over) */
.table-custom tbody tr:hover {
    background-color: rgba(47, 80, 110, 0.15) !important;
    transition: background-color 0.2s ease;
}

/* 5. Cell Spacing & Text */
.table-custom tbody td {
    padding: 12px 15px; /* More vertical space for readability */
    border-bottom: 1px solid #e2e8f0;
    color: var(--text-color);
    vertical-align: middle;
}

/* 6. Typography tweaks for specific data */
.data-id {
    font-family: 'Courier New', monospace; /* Monospace for IDs looks technical */
    font-weight: 600;
    color: var(--secondary-color);
}

.data-amount {
    font-weight: 700;
    color: #059669; /* Green for money */
}

/* --- ZEBRA STRIPING & ALIGNMENT (from list_invoice.php) --- */

/* Zebra Striping */
.invoice-table tbody tr:nth-child(even) {
    background-color: rgba(47, 80, 110, 0.04); /* Uses your Theme Blue */
}
.invoice-table tbody tr:hover {
    background-color: rgba(47, 80, 110, 0.1); /* Hover Effect */
}

/* Action Buttons Alignment */
.action-buttons {
    display: flex;
    gap: 6px;
    justify-content: center; /* Centers the buttons */
    width: 100%;
}

.action-header {
    text-align: center !important;
}

/* Compact Table */
.compact-table td, .compact-table th { 
    padding: 0.5rem 0.6rem;
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Mobile Card View */
.mobile-invoice-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    border-bottom: 1px dashed #f1f5f9;
    padding-bottom: 8px;
}

.card-label {
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
}


/* Media Queries for Visibility
@media (max-width: 768px) {
    .mobile-invoice-card { display: none !important; }
    .table-responsive { display: block !important; }
}

@media (min-width: 769px) {
.table-responsive { display: none !important; }
.mobile-invoice-card { display: block !important; }
  
}
*/

/* Media Queries for Visibility */
@media (max-width: 768px) {

    .table-responsive { 
        display: block !important; 
        border: 0;
    }

    /* Force the table to stack vertically on small screens */
    table, thead, tbody, th, td, tr { 
        display: block; 
    }
    
    /* Hide table headers (but keep for screen readers) */
    thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    tr { border: 1px solid #ccc; margin-bottom: 10px; border-radius: 8px; }
    
    td { 
        border: none;
        border-bottom: 1px solid #eee; 
        position: relative;
        padding-left: 50% !important; 
        text-align: right;
    }
    
    td:before { 
        position: absolute;
        top: 12px;
        left: 15px;
        width: 45%; 
        padding-right: 10px; 
        white-space: nowrap;
        content: attr(data-label); /* This pulls the text from your HTML data-label */
        font-weight: bold;
        text-align: left;
        color: var(--primary-color);
    }
}

