/* Amuzu Beverages WMS - Main Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --sidebar-width: 260px;
    --header-height: 65px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--text-color);
    background-color: #f9fafb;
    line-height: 1.6;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 8px;
}

.login-header p {
    color: #6b7280;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark-color);
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.login-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

.alert-error {
    background-color: #fee2e2;
    border-color: var(--danger-color);
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border-color: var(--info-color);
    color: #1e40af;
}

/* Main Layout */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background-color: #111827;
    border-bottom: 1px solid #374151;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.sidebar-nav ul {
    list-style: none;
    padding: 15px 0;
}

.sidebar-nav li {
    margin-bottom: 5px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover {
    background-color: #374151;
    color: white;
}

.sidebar-nav a.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar-nav a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar-nav a i.fa-chevron-down {
    margin-left: auto;
    margin-right: 0;
    font-size: 12px;
}

/* Submenu Styles */
.has-submenu {
    position: relative;
}

.has-submenu > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.submenu {
    list-style: none;
    padding: 0;
    background-color: #1a1f2e;
    display: none;
}

.has-submenu.active > .submenu {
    display: block;
}

.submenu li a {
    padding-left: 50px;
    font-size: 13px;
}

.submenu li a:hover {
    background-color: #2d3748;
}

.submenu li a.active {
    background-color: #4a5568;
    color: white;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left h1 {
    font-size: 22px;
    color: var(--dark-color);
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-color);
    cursor: pointer;
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.3s;
}

.user-btn:hover {
    background-color: var(--light-color);
}

.user-btn i.fa-user-circle {
    font-size: 28px;
    color: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 220px;
    display: none;
}

.user-dropdown.show {
    display: block;
}

.user-info {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.user-name {
    font-weight: 600;
    color: var(--dark-color);
}

.user-role {
    font-size: 12px;
    color: #6b7280;
}

.user-dropdown a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.3s;
}

.user-dropdown a:hover {
    background-color: var(--light-color);
}

.user-dropdown a i {
    margin-right: 10px;
    width: 18px;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 30px;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-color);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: #f9fafb;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon.red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.stat-content h4 {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-content .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: var(--light-color);
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
}

table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:hover {
    background-color: #f9fafb;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    margin-top: 20px;
    justify-content: center;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
}

.pagination a:hover {
    background-color: var(--light-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Footer */
.main-footer {
    padding: 20px 30px;
    background-color: white;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 15px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .sidebar,
    .header,
    .sidebar-toggle,
    .card-header .btn,
    .btn,
    .stats-grid,
    .alert,
    .form-row,
    .quick-actions-grid,
    .modal,
    .no-print {
        display: none !important;
    }
    
    /* Adjust layout */
    body {
        background: white;
        font-size: 12px;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 0 !important;
    }
    
    .page-content {
        padding: 0 !important;
    }
    
    /* Card styling */
    .card {
        box-shadow: none;
        border: none;
        page-break-inside: avoid;
    }
    
    .card-header {
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .card-header h3 {
        margin: 0;
        font-size: 18px;
        color: #000;
    }
    
    .card-body {
        padding: 0;
    }
    
    /* Table styling */
    table {
        width: 100%;
        border-collapse: collapse;
    }
    
    table thead {
        background-color: #f0f0f0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    table th {
        background-color: #f0f0f0 !important;
        color: #000 !important;
        font-weight: bold;
        padding: 8px;
        border: 1px solid #ccc;
    }
    
    table td {
        padding: 6px;
        border: 1px solid #ccc;
    }
    
    table tbody tr {
        page-break-inside: avoid;
    }
    
    /* Badge styling */
    .badge {
        background-color: #000 !important;
        color: #fff !important;
        padding: 2px 6px;
        border-radius: 3px;
        font-weight: normal;
    }
    
    /* Page breaks */
    @page {
        margin: 1cm;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    /* Report header */
    .report-header {
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }
    
    .report-header h1 {
        font-size: 20px;
        margin: 0 0 5px 0;
        color: #000;
    }
    
    .report-header .company-info {
        font-size: 11px;
        color: #666;
    }
    
    /* Print footer */
    .print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 10px;
        color: #666;
        border-top: 1px solid #ccc;
        padding: 5px;
    }
    
    /* Summary stats */
    .stat-card {
        border: 1px solid #ccc;
        padding: 10px;
        margin-bottom: 10px;
        page-break-inside: avoid;
    }
    
    .stat-value {
        font-size: 16px;
        font-weight: bold;
        color: #000;
    }
    
    /* Color adjustments */
    * {
        color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Remove shadows and backgrounds */
    .card, .stat-card, .card-header {
        box-shadow: none !important;
        background: white !important;
    }
    
    /* Ensure print visibility */
    .table-container {
        overflow: visible !important;
    }
}
.gap-1 { gap: 10px; }
.gap-2 { gap: 20px; }

