@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    /* =========================================
       BRAND PALETTE - PT. AULIAN PUTRA KONSTRUKSI
       Extracted exact hex values from user palette:
       Stripe 1: #000000 (Black / Dark Carbon)
       Stripe 2: #1E3A4C (Dark Slate Navy / Steel Blue)
       Stripe 3: #FE8029 (Safety Construction Orange)
       Stripe 4: #EBEDF0 (Light Concrete Grey / Surface)
       ========================================= */
    --brand-black: #0d151c;
    --brand-slate: #1e3a4c;
    --brand-slate-dark: #142834;
    --brand-slate-light: #2c4c62;
    --brand-orange: #fe8029;
    --brand-orange-hover: #e56d18;
    --brand-orange-light: #fff3eb;
    --brand-orange-glow: rgba(254, 128, 41, 0.25);
    --brand-light: #ebedf0;
    
    /* Primary action tokens mapped to Construction Safety Orange */
    --primary: #fe8029;
    --primary-hover: #e56d18;
    --primary-light: #fff3eb;
    --primary-glow: rgba(254, 128, 41, 0.25);
    
    /* Secondary tokens mapped to Dark Slate Navy */
    --secondary: #1e3a4c;
    --secondary-hover: #142834;
    --secondary-light: #e8f0f5;
    
    /* Dark Theme / Sidebar (Black to Slate Navy) */
    --dark-sidebar: #0d151c;
    --dark-sidebar-card: #1e3a4c;
    --dark-sidebar-border: rgba(255, 255, 255, 0.08);
    --dark-sidebar-hover: rgba(254, 128, 41, 0.12);
    
    /* Light Surface / Body (Concrete Light Tint) */
    --bg-body: #ebedf0;
    --surface: #ffffff;
    --surface-border: #d5dce2;
    --surface-muted: #f4f6f8;
    
    --text-primary: #0d151c;
    --text-secondary: #3b4e5d;
    --text-muted: #788a99;
    
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;
    
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 25px -3px rgb(0 0 0 / 0.09), 0 4px 10px -4px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 20px 30px -10px rgb(0 0 0 / 0.14);
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* =========================================
   SIDEBAR (PT. AULIAN PUTRA KONSTRUKSI)
   ========================================= */
.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0d151c 0%, #14232f 50%, #1e3a4c 100%);
    color: #ffffff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--dark-sidebar-border);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    padding: 22px 18px;
    border-bottom: 1px solid var(--dark-sidebar-border);
}

.sidebar-logo-card {
    background: #ffffff;
    padding: 12px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(254, 128, 41, 0.3);
}

.sidebar-logo-card img {
    max-width: 100%;
    height: auto;
    max-height: 75px;
    object-fit: contain;
    display: block;
}

.sidebar-brand-sub {
    margin-top: 12px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffd0af;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 4px;
}

.sidebar-brand-sub::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-orange);
    box-shadow: 0 0 8px var(--brand-orange);
}

.sidebar-menu {
    list-style: none;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.sidebar-menu-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8da2b3;
    padding: 12px 12px 6px;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #c7d5df;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
    gap: 12px;
}

.sidebar-menu a i {
    width: 20px;
    font-size: 15px;
    color: #92a7b6;
    transition: var(--transition);
    text-align: center;
}

.sidebar-menu a:hover {
    background: var(--dark-sidebar-hover);
    color: #ffffff;
    transform: translateX(3px);
}

.sidebar-menu a:hover i {
    color: var(--brand-orange);
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, #fe8029 0%, #e56d18 100%);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(254, 128, 41, 0.45);
}

.sidebar-menu a.active i {
    color: #ffffff;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--dark-sidebar-border);
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-footer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fe8029, #1e3a4c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ffffff;
    font-size: 14px;
}

.sidebar-footer-info {
    flex: 1;
    overflow: hidden;
}

.sidebar-footer-info .name {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-footer-info .role {
    font-size: 11px;
    color: #ffd0af;
}

/* =========================================
   MAIN CONTENT & HEADER
   ========================================= */
.main-content {
    flex: 1;
    margin-left: 270px;
    padding: 28px 36px;
    min-height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    background: var(--surface);
    padding: 20px 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.header-title-group h1 {
    color: var(--text-primary);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title-group h1 .greeting-badge {
    font-size: 12px;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--brand-orange);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(254, 128, 41, 0.2);
}

.header-title-group p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 14px;
    align-items: center;
}

.date-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-muted);
    border: 1px solid var(--surface-border);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.date-pill i {
    color: var(--brand-orange);
}

.search-input {
    padding: 10px 16px;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-sm);
    width: 280px;
    font-size: 14px;
    font-family: inherit;
    background: var(--surface-muted);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--brand-orange);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* =========================================
   STATISTICS CARDS (DASHBOARD)
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: #b8c4ce;
}

.stat-card:nth-child(1):hover::before { background: var(--brand-orange); }
.stat-card:nth-child(2):hover::before { background: #ef4444; }
.stat-card:nth-child(3):hover::before { background: var(--brand-slate); }
.stat-card:nth-child(4):hover::before { background: #10b981; }

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon { background: var(--brand-orange-light); color: var(--brand-orange); }
.stat-card:nth-child(2) .stat-icon { background: #fef2f2; color: #ef4444; }
.stat-card:nth-child(3) .stat-icon { background: var(--secondary-light); color: var(--brand-slate); }
.stat-card:nth-child(4) .stat-icon { background: #ecfdf5; color: #10b981; }

.stat-info {
    min-width: 0;
}

.stat-info h3 {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
    letter-spacing: -0.03em;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    text-transform: capitalize;
}

.stat-info .stat-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* =========================================
   DASHBOARD SECTIONS & ACTIVITIES
   ========================================= */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.dashboard-section {
    background: var(--surface);
    padding: 26px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--surface-border);
}

.section-header h2,
.dashboard-section > h2 {
    color: var(--text-primary);
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2 i,
.dashboard-section > h2 i {
    color: var(--brand-orange);
    font-size: 16px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--surface-muted);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.activity-item:hover {
    background: #ffffff;
    border-color: #b8c4ce;
    box-shadow: var(--shadow-sm);
}

.activity-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.activity-icon.login { background: var(--secondary-light); color: var(--brand-slate); }
.activity-icon.logout { background: #f1f5f9; color: #64748b; }
.activity-icon.add { background: #ecfdf5; color: #059669; }
.activity-icon.release { background: var(--brand-orange-light); color: var(--brand-orange); }
.activity-icon.edit { background: #f5f3ff; color: #7c3aed; }
.activity-icon.delete { background: #fef2f2; color: #dc2626; }

.activity-content {
    flex: 1;
}

.activity-content p {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 3px;
}

.activity-content small {
    color: var(--text-muted);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.quick-action-card {
    background: var(--surface-muted);
    border: 1px solid var(--surface-border);
    padding: 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.quick-action-card:hover {
    background: var(--surface);
    border-color: var(--brand-orange);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-action-card .qa-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.quick-action-card .qa-text h4 {
    font-size: 14px;
    font-weight: 700;
}

.quick-action-card .qa-text p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* =========================================
   GALLERY / DATABASE GRID (database.php)
   ========================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.material-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.material-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #b8c4ce;
}

.material-image {
    position: relative;
    height: 190px;
    background: #e2e8f0;
    overflow: hidden;
}

.material-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.material-card:hover .material-image img {
    transform: scale(1.05);
}

.no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ebedf0 0%, #d5dce2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #788a99;
}

.no-image i {
    font-size: 42px;
    margin-bottom: 8px;
    color: var(--brand-slate);
}

.no-image p {
    font-size: 13px;
    font-weight: 600;
}

.stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}

.stock-badge.in-stock {
    background: rgba(30, 58, 76, 0.9);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stock-badge.low-stock {
    background: rgba(254, 128, 41, 0.95);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.category-badge.consumables {
    background: rgba(14, 116, 144, 0.92);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.category-badge.proyek {
    background: rgba(194, 65, 12, 0.92);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.category-badge.umum {
    background: rgba(71, 85, 105, 0.92);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.material-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.material-info h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 14px;
    color: var(--text-primary);
    line-height: 1.3;
}

.material-details {
    background: var(--surface-muted);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid var(--surface-border);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: 13px;
}

.detail-row:not(:last-child) {
    border-bottom: 1px dashed #d5dce2;
}

.detail-row .label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-row .value {
    color: var(--text-primary);
    font-weight: 700;
}

.material-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* No Data State */
.no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 70px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.no-data i {
    font-size: 54px;
    color: #b8c4ce;
    margin-bottom: 16px;
    display: inline-block;
}

.no-data h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.no-data p {
    color: var(--text-secondary);
    margin-bottom: 22px;
    font-size: 14px;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 700;
    font-family: inherit;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #fe8029 0%, #e56d18 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(254, 128, 41, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e56d18 0%, #cb5c10 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(254, 128, 41, 0.45);
    color: #ffffff;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1.5px solid var(--surface-border);
}

.btn-secondary:hover {
    background: var(--surface-muted);
    color: var(--text-primary);
    border-color: #b8c4ce;
    transform: translateY(-1px);
}

.btn-edit {
    background: var(--secondary-light);
    color: var(--brand-slate);
    border: 1px solid #b8cdda;
    flex: 1;
}

.btn-edit:hover {
    background: var(--brand-slate);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-delete {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
    flex: 1;
}

.btn-delete:hover {
    background: var(--danger);
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-logout {
    background: #ffffff;
    color: #dc2626;
    border: 1.5px solid #fecaca;
    padding: 8px 16px;
    font-size: 13px;
}

.btn-logout:hover {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

/* =========================================
   FORMS & INPUTS
   ========================================= */
.form-container {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    max-width: 860px;
}

.form-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--surface-border);
}

.form-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}

.form-header p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group label .required {
    color: var(--brand-orange);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--surface-muted);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-orange);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group input.readonly {
    background-color: #f1f5f9;
    color: var(--text-secondary);
    cursor: not-allowed;
    border-style: dashed;
}

.form-help {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.file-upload {
    position: relative;
    border: 2px dashed #b8c4ce;
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    background: var(--surface-muted);
    transition: var(--transition);
    cursor: pointer;
}

.file-upload:hover {
    border-color: var(--brand-orange);
    background: var(--brand-orange-light);
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-display i {
    font-size: 40px;
    color: var(--brand-slate);
    margin-bottom: 10px;
    display: block;
}

.file-upload-display p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.file-upload-display small {
    color: var(--text-muted);
    font-size: 11px;
}

.image-preview-wrapper {
    margin-top: 14px;
    display: none;
    justify-content: center;
}

.image-preview-wrapper img {
    max-height: 140px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.form-actions {
    display: flex;
    gap: 14px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--surface-border);
}

/* Live Calc Info Box */
.calc-info-box {
    background: linear-gradient(135deg, var(--brand-orange-light) 0%, #ffffff 100%);
    border: 1.5px solid #ffd0af;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.calc-info-box .calc-label {
    font-size: 13px;
    color: var(--brand-slate);
    font-weight: 700;
}

.calc-info-box .calc-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--brand-orange);
}

/* =========================================
   ALERTS
   ========================================= */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: var(--success-bg);
    color: #065f46;
    border: 1px solid var(--success-border);
}

.alert-success i {
    color: #10b981;
    font-size: 18px;
}

.alert-error {
    background: var(--danger-bg);
    color: #991b1b;
    border: 1px solid var(--danger-border);
}

.alert-error i {
    color: #ef4444;
    font-size: 18px;
}

/* =========================================
   REPORT STYLES & EXPORT BAR
   ========================================= */
.report-filter-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.report-filter-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-filter-title i {
    color: var(--brand-orange);
}

.period-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.period-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    background: var(--surface-muted);
    border: 1.5px solid var(--surface-border);
    color: var(--text-secondary);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.period-btn:hover {
    background: var(--brand-orange-light);
    color: var(--brand-orange);
    border-color: #ffd0af;
}

.period-btn.active {
    background: var(--brand-orange);
    color: #ffffff;
    border-color: var(--brand-orange);
    box-shadow: 0 2px 8px rgba(254, 128, 41, 0.35);
}

.custom-date-form {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px dashed var(--surface-border);
}

.date-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.date-field-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.date-field-group input[type="date"] {
    padding: 9px 14px;
    border: 1.5px solid var(--surface-border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-family: inherit;
    background: var(--surface-muted);
    color: var(--text-primary);
}

.date-field-group input[type="date"]:focus {
    outline: none;
    border-color: var(--brand-orange);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.report-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.report-badge-info {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.report-export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-print {
    background: #ffffff;
    color: var(--brand-slate);
    border: 1.5px solid var(--surface-border);
    font-weight: 700;
}

.btn-print:hover {
    background: var(--surface-muted);
    border-color: var(--brand-slate);
    color: var(--brand-slate);
}

.btn-excel {
    background: #107c41; /* Microsoft Excel Green */
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(16, 124, 65, 0.3);
}

.btn-excel:hover {
    background: #0b5a2f;
    color: #ffffff;
    transform: translateY(-1px);
}

.btn-csv {
    background: var(--brand-slate);
    color: #ffffff;
    border: none;
    box-shadow: 0 2px 8px rgba(30, 58, 76, 0.3);
}

.btn-csv:hover {
    background: var(--brand-slate-dark);
    color: #ffffff;
    transform: translateY(-1px);
}

/* =========================================
   TABLES
   ========================================= */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table th,
.data-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--surface-border);
}

.data-table th {
    background: var(--surface-muted);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 13px;
}

.data-table tr:hover {
    background: #f8fafc;
}

/* Print Only Elements (Hidden on screen) */
.print-only {
    display: none;
}

@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: Arial, sans-serif !important;
        font-size: 10pt !important;
        margin: 0 !important;
        padding: 8mm !important;
    }

    .sidebar,
    .header,
    .report-filter-card,
    .report-export-buttons,
    .btn,
    .sidebar-footer,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .print-only {
        display: block !important;
    }

    .print-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        border-bottom: 2.5px solid #000000;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .print-logo-box img {
        max-height: 55px;
    }

    .print-company-details {
        text-align: right;
        font-size: 9pt;
        color: #222222;
        line-height: 1.4;
    }

    .print-report-title {
        text-align: center;
        margin: 14px 0;
    }

    .print-report-title h2 {
        font-size: 14pt;
        font-weight: bold;
        text-transform: uppercase;
        margin-bottom: 4px;
        color: #000000;
    }

    .print-report-title p {
        font-size: 9.5pt;
        color: #444444;
    }

    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 20px !important;
    }

    .stat-card {
        border: 1px solid #777777 !important;
        box-shadow: none !important;
        padding: 8px !important;
        background: #ffffff !important;
    }

    .stat-icon {
        display: none !important;
    }

    .stat-info h3 {
        font-size: 13pt !important;
        color: #000000 !important;
    }

    .stat-info p {
        font-size: 8.5pt !important;
        color: #333333 !important;
    }

    .stat-info .stat-subtitle {
        display: none !important;
    }

    .dashboard-section {
        border: 1px solid #777777 !important;
        box-shadow: none !important;
        padding: 10px !important;
        margin-bottom: 14px !important;
        background: #ffffff !important;
        page-break-inside: avoid;
    }

    .section-header h2 {
        font-size: 11pt !important;
        color: #000000 !important;
    }

    .data-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .data-table th,
    .data-table td {
        border: 1px solid #555555 !important;
        padding: 5px 7px !important;
        font-size: 8.5pt !important;
        color: #000000 !important;
    }

    .data-table th {
        background: #e5e5e5 !important;
        font-weight: bold !important;
    }

    .print-signatures {
        display: flex !important;
        justify-content: space-between;
        margin-top: 30px;
        padding-top: 15px;
        page-break-inside: avoid;
    }

    .print-signature-box {
        text-align: center;
        width: 210px;
        font-size: 9pt;
    }

    .print-signature-space {
        height: 60px;
    }

    .print-signature-name {
        font-weight: bold;
        text-decoration: underline;
    }
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
    .sidebar {
        width: 80px;
    }
    
    .sidebar .sidebar-brand-sub,
    .sidebar-menu a span,
    .sidebar-menu-category,
    .sidebar-footer-info {
        display: none;
    }
    
    .sidebar-header {
        padding: 12px;
    }
    
    .sidebar-logo-card {
        padding: 6px;
    }
    
    .sidebar-menu a {
        justify-content: center;
        padding: 14px;
    }
    
    .sidebar-menu a i {
        margin: 0;
        font-size: 18px;
    }
    
    .main-content {
        margin-left: 80px;
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
    }
    
    .sidebar-menu {
        flex-direction: row;
        padding: 8px;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 16px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   TAB NAVIGATION (ADD MATERIAL MODES)
   ========================================= */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--surface-border);
    padding-bottom: 2px;
}

.tab-btn {
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
    font-family: inherit;
}

.tab-btn i {
    font-size: 16px;
    color: var(--text-muted);
    transition: var(--transition);
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(254, 128, 41, 0.06);
}

.tab-btn:hover i {
    color: var(--brand-orange);
}

.tab-btn.active {
    color: var(--brand-orange);
}

.tab-btn.active i {
    color: var(--brand-orange);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-orange);
    border-radius: 3px 3px 0 0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   BULK IMPORT EXCEL / CSV CARD
   ========================================= */
.bulk-template-box {
    background: var(--secondary-light);
    border: 1.5px solid #b8cdda;
    border-radius: var(--radius-md);
    padding: 18px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
}

.bulk-template-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bulk-template-info i {
    font-size: 32px;
    color: #107c41;
}

.bulk-template-text h4 {
    font-size: 14px;
    font-weight: 800;
    color: var(--brand-slate);
}

.bulk-template-text p {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.bulk-dropzone {
    border: 2px dashed #b8c4ce;
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
    padding: 36px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    margin-bottom: 24px;
}

.bulk-dropzone:hover,
.bulk-dropzone.dragover {
    border-color: var(--brand-orange);
    background: var(--brand-orange-light);
}

.bulk-dropzone i {
    font-size: 48px;
    color: var(--brand-slate);
    margin-bottom: 12px;
    display: block;
}

.bulk-dropzone h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.bulk-dropzone p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* =========================================
   DASHBOARD CHARTS (CHART.JS)
   ========================================= */
.charts-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 28px;
}

.chart-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--surface-border);
}

.chart-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-header h3 i {
    color: var(--brand-orange);
}

.chart-badge {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.chart-body {
    position: relative;
    flex: 1;
    min-height: 260px;
    max-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}