/* assets/css/style.css */

/* Google Fonts Imports */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #0D3B66;       /* Deep Navy Blue from Saerni wordmark */
    --secondary-color: #2AA6A6;     /* Teal / Cyan from tagline and magnifying glass */
    --accent-color: #3DBB5E;        /* Vibrant Green from checkmark */
    --warning-color: #E8822A;       /* Orange from accent dot */
    --danger-color: #DC3545;        /* Red for alerts/errors */
    --bg-color: #F5F7FA;            /* Warm Off-White page background */
    --surface-color: #FFFFFF;       /* Card/Panel backgrounds */
    
    --text-primary: #1A2332;
    --text-secondary: #6C757D;
    --border-color: #DEE2E6;
    
    --card-shadow: 0 4px 15px rgba(13, 59, 102, 0.05);
    --hover-shadow: 0 8px 25px rgba(13, 59, 102, 0.1);
    --transition-speed: 0.3s;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 0.95rem;
    overflow-x: hidden;
}

/* Typography Customization */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-color);
}

/* Custom Buttons matching brand palette */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    transition: all var(--transition-speed);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #082643;
    border-color: #082643;
    box-shadow: 0 4px 10px rgba(13, 59, 102, 0.2);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    font-weight: 600;
    transition: all var(--transition-speed);
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #1e7d7d;
    border-color: #1e7d7d;
    box-shadow: 0 4px 10px rgba(42, 166, 166, 0.2);
}

.btn-success {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
}

.btn-success:hover, .btn-success:focus {
    background-color: #2f944a;
    border-color: #2f944a;
}

.btn-warning {
    background-color: var(--warning-color);
    border-color: var(--warning-color);
    color: #fff;
    font-weight: 600;
}

.btn-warning:hover, .btn-warning:focus {
    background-color: #cc7020;
    border-color: #cc7020;
    color: #fff;
}

/* Navbar Customization */
.navbar-custom {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #FFFFFF !important;
}

.navbar-custom .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.navbar-custom .nav-link:hover, .navbar-custom .nav-link.active {
    color: #FFFFFF !important;
}

.navbar-custom .notification-bell {
    position: relative;
    font-size: 1.25rem;
}

.navbar-custom .notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--warning-color);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.15rem 0.35rem;
    border-radius: 50%;
}

/* Cards & Layout Panels */
.card-custom {
    background-color: var(--surface-color);
    border: none;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    margin-bottom: 1.5rem;
}

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

.card-custom-accent-teal {
    border-left: 4px solid var(--secondary-color);
}

.card-custom-accent-navy {
    border-left: 4px solid var(--primary-color);
}

.card-custom-accent-orange {
    border-left: 4px solid var(--warning-color);
}

.card-custom-accent-green {
    border-left: 4px solid var(--accent-color);
}

/* Layout Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--primary-color);
    color: #ffffff;
    transition: all 0.3s ease;
    height: 100vh;
    max-height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 1040;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* Custom Scrollbar for Sidebar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.45);
}

#sidebar.active {
    margin-left: -260px;
}

#sidebar .sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#sidebar ul.components {
    padding: 20px 0;
    flex-grow: 1;
}

#sidebar ul p {
    color: rgba(255, 255, 255, 0.4);
    padding: 10px 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 5px;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 0.95rem;
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: all var(--transition-speed);
    border-left: 4px solid transparent;
}

#sidebar ul li a i {
    width: 20px;
    margin-right: 10px;
    font-size: 1.05rem;
}

#sidebar ul li a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--secondary-color);
}

#sidebar ul li.active > a {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-left: 4px solid var(--secondary-color);
}

.sidebar-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-footer h6 {
    color: #ffffff;
    margin-bottom: 2px;
}

/* Header & Controls Sizing */
.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    transition: all var(--transition-speed);
}

.btn-icon:hover {
    background-color: #f8f9fa;
    border-color: #c3c6c9;
}

.btn-icon i {
    font-size: 1.1rem;
}

.top-header {
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    margin: -30px -30px 25px -30px;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

#content {
    flex-grow: 1;
    min-width: 0;
    padding: 30px;
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Responsive Drawer Styles */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: -260px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1050;
    }
    #sidebar.active {
        margin-left: 0;
    }
    #content {
        padding: 20px;
        width: 100%;
    }
    .top-header {
        margin: -20px -20px 20px -20px;
        padding: 15px 20px;
    }
}

/* Tables design */
.table-custom {
    background: var(--surface-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

.table-custom thead th {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 15px;
}

.table-custom tbody td {
    padding: 12px 15px;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

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

.table-custom tbody tr:hover {
    background-color: rgba(42, 166, 166, 0.02);
}

/* Status Badges */
.badge-custom {
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
}

.badge-ok {
    background-color: rgba(61, 187, 94, 0.15);
    color: #27823f;
}

.badge-warning-custom {
    background-color: rgba(232, 130, 42, 0.15);
    color: #b05c15;
}

.badge-danger-custom {
    background-color: rgba(220, 53, 69, 0.15);
    color: #a71d2a;
}

.badge-info-custom {
    background-color: rgba(13, 59, 102, 0.1);
    color: var(--primary-color);
}

/* Forms design */
.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(42, 166, 166, 0.25);
}

/* Dashboard statistics cards */
.stat-card {
    border-radius: 10px;
    border: none;
    box-shadow: var(--card-shadow);
    background: var(--surface-color);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-speed);
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .stat-icon {
    font-size: 2.25rem;
    position: absolute;
    right: 15px;
    bottom: 10px;
    opacity: 0.15;
    color: var(--primary-color);
}

.stat-card.stat-teal .stat-icon {
    color: var(--secondary-color);
}

.stat-card.stat-orange .stat-icon {
    color: var(--warning-color);
}

.stat-card.stat-green .stat-icon {
    color: var(--accent-color);
}

/* Responsive collapse button */
.sidebarCollapseBtn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}

/* Multi-step list for receipt upload review page */
.steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.step-item {
    position: relative;
    z-index: 2;
    background-color: var(--bg-color);
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all var(--transition-speed);
}

.step-item.active .step-icon {
    border-color: var(--secondary-color);
    background-color: var(--secondary-color);
    color: #fff;
}

.step-item.completed .step-icon {
    border-color: var(--accent-color);
    background-color: var(--accent-color);
    color: #fff;
}

.step-label {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.step-item.active .step-label {
    color: var(--secondary-color);
}

.step-item.completed .step-label {
    color: var(--accent-color);
}

/* Printable styles */
@media print {
    body {
        background-color: #fff;
        color: #000;
    }
    #sidebar, .navbar-custom, .btn, .no-print {
        display: none !important;
    }
    #content {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .card-custom {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
