/* ============================================================
   FUTURISTIC MINIMALIST GREEN THEME
   Fully Responsive – Proportional Sizing
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:wght@100..900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --primary-glow: rgba(16, 185, 129, 0.25);
    --secondary: #064e3b;
    --secondary-light: #065f46;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Google Sans Flex', sans-serif;
    font-weight: 400;
    background: linear-gradient(135deg, var(--gray-50) 0%, #eef2f5 100%);
    color: var(--gray-800);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}


/* ─── MAIN CONTENT ─── */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--gray-50);
    width: calc(100% - 200px);
}
.sidebar.collapsed ~ .main-content {
    margin-left: 100px;
    width: calc(100% - 100px);
}

/* ─── HEADER ─── */
.header {
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 20;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.menu-toggle {
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-600);
    transition: var(--transition);
}
.menu-toggle:hover {
    color: var(--primary);
    transform: scale(1.05);
}
.header-left h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}
.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.welcome-text {
    font-size: 0.875rem;
    color: var(--gray-600);
}
.btn-logout {
    color: var(--gray-500);
    font-size: 1.1rem;
    transition: var(--transition);
}
.btn-logout:hover {
    color: var(--danger);
    transform: scale(1.05);
}

.warehouse-switcher select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    background: white;
    font-size: 0.85rem;
    color: var(--gray-700);
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 140px;
}
.warehouse-switcher select:hover {
    border-color: var(--primary);
}
.warehouse-switcher select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.warehouse-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    background: var(--gray-100);
    padding: 4px 12px;
    border-radius: 20px;
    margin-right: 10px;
    white-space: nowrap;
    display: inline-block;
    border: 1px solid var(--gray-200);
}

/* ─── HEADER MOBILE DROPDOWN ─── */
.header-mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0 8px;
}
.header-mobile-toggle:hover {
    color: var(--primary);
}
.header-dropdown {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* ─── PAGE CONTENT ─── */
.content {
    padding: 1.5rem;
    flex: 1;
    width: 100%;
    overflow-x: hidden;
    background: white;
}

/* ─── DASHBOARD ─── */
.dashboard-header {
    padding: 0.5rem 0;
}
.dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
.card {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}
.card-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.card.warning .card-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}
.card-info h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}
.card-info p {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.2;
}

.dashboard-row {
    display: flex;
    gap: 1.5rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}
.dashboard-card {
    flex: 1;
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.dashboard-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary);
    padding-left: 0.75rem;
}
.dashboard-card canvas {
    max-height: 250px;
    width: 100% !important;
}
.chart-container {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 1.5rem 0;
}

/* ─── TABLES ─── */
.table-container,
.activity-table-container {
    overflow-x: auto;
    margin: 1.25rem 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    background: white;
    box-shadow: var(--shadow-sm);
    -webkit-overflow-scrolling: touch;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    min-width: 600px;
}
.table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}
.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}
.table tbody tr:hover {
    background: var(--gray-50);
}
.table.small {
    font-size: 0.8rem;
}
.table.small th,
.table.small td {
    padding: 0.5rem 0.75rem;
}

/* ─── BADGES ─── */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge.in, .badge.success { background: #d1fae5; color: #065f46; }
.badge.out, .badge.danger { background: #fee2e2; color: #991b1b; }
.badge.warning { background: #fed7aa; color: #92400e; }
.badge.pending { background: #e2e3e5; color: #383d41; }
.badge.approved { background: #c7d2fe; color: #3730a3; }
.badge.dispatched { background: #cffafe; color: #155e75; }
.badge.scheduled { background: #3498db; color: white; }
.badge.ongoing { background: #2ecc71; color: white; }
.badge.ended { background: #95a5a6; color: white; }
.badge.cancelled { background: #e74c3c; color: white; }
.badge-primary { background: #3b82f6; color: white; }
.badge-secondary { background: var(--gray-400); color: white; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-light { background: var(--gray-100); color: var(--gray-700); }
.badge-dark { background: var(--gray-800); color: white; }

/* ─── FORMS ─── */
.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-700);
    letter-spacing: 0.02em;
}
.form-group .required {
    color: var(--danger);
    margin-left: 0.2rem;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-800);
    background: #ffffff;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    outline: none;
    background: #ffffff;
}
.form-control:hover {
    border-color: var(--gray-400);
}
.form-control::placeholder {
    color: var(--gray-400);
    opacity: 1;
}
.form-control:disabled,
.form-control[readonly] {
    background: var(--gray-100);
    opacity: 0.7;
    cursor: not-allowed;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px 7px;
    padding-right: 2.5rem;
    cursor: pointer;
}
select.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
select.form-control option {
    padding: 0.5rem;
    background: white;
    color: var(--gray-800);
}
select[multiple].form-control {
    background-image: none;
    padding: 0.5rem;
    min-height: 120px;
}
select[multiple].form-control option {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
}
select[multiple].form-control option:checked {
    background: var(--primary);
    color: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}
textarea.form-control:focus {
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-control-file {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-700);
    background: white;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
}
.form-control-file:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}
.form-control-file::-webkit-file-upload-button {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 0.75rem;
}
.form-control-file::-webkit-file-upload-button:hover {
    background: var(--primary-dark);
}
.form-control-file::file-selector-button {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin-right: 0.75rem;
}
.form-control-file::file-selector-button:hover {
    background: var(--primary-dark);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    transition: all 0.15s;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}
.form-check input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}
.form-check input[type="checkbox"]:checked::after {
    content: "✓";
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.form-check input[type="radio"] {
    border-radius: 50%;
}
.form-check input[type="radio"]:checked {
    border-color: var(--primary);
    background: white;
}
.form-check input[type="radio"]:checked::after {
    content: "";
    width: 0.625rem;
    height: 0.625rem;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.form-check input[type="checkbox"]:focus,
.form-check input[type="radio"]:focus {
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-check input[type="checkbox"]:disabled,
.form-check input[type="radio"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.form-check label {
    font-size: 0.9rem;
    color: var(--gray-700);
    cursor: pointer;
}

.form-check-inline {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.form-check-inline .form-check {
    margin-bottom: 0;
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}
.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

/* validation states */
.form-control.is-valid {
    border-color: var(--primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.8rem;
}
.form-control.is-invalid {
    border-color: var(--danger);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='15' y1='9' x2='9' y2='15'/%3E%3Cline x1='9' y1='9' x2='15' y2='15'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.8rem;
}
.invalid-feedback {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--danger);
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.625rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}
.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-200);
}
.btn-secondary:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
    transform: translateY(-2px);
}
.btn-success {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.btn-success:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}
.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    transform: translateY(-2px);
}
.btn-warning {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}
.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    transform: translateY(-2px);
}
.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    border-radius: 40px;
}
.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.05rem;
    border-radius: 50px;
}
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-500);
    border-radius: 50%;
    transition: all 0.2s;
    cursor: pointer;
}
.btn-icon:hover {
    background: var(--gray-100);
    color: var(--primary);
    transform: scale(1.05);
}
.btn-icon:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.btn-join {
    background: var(--primary);
    color: white;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
}
.btn-join:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}
.btn-edit {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}
.btn-edit:hover { background: var(--gray-200); }
.btn-cancel {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.btn-cancel:hover { background: #fecaca; }

.action-buttons {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    justify-content: flex-end;
}
.action-buttons .btn {
    box-shadow: none;
    border: 1px solid var(--gray-200);
}
.action-buttons .btn-primary {
    border: none;
}

/* ─── FILTERS ─── */
.filter-form {
    background: white;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}
.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.filter-row > * {
    flex: 1 1 200px;
}
.filter-row .btn {
    flex: 0 0 auto;
}
.filter-row input,
.filter-row select {
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

/* ─── ALERTS ─── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    border-left: 4px solid transparent;
}
.alert-success { background: #d1fae5; color: #065f46; border-left-color: #10b981; }
.alert-error { background: #fee2e2; color: #991b1b; border-left-color: #ef4444; }
.alert-info { background: #dbeafe; color: #1e40af; border-left-color: #3b82f6; }
.alert-warning { background: #fef3c7; color: #92400e; border-left-color: var(--warning); }

/* ─── MODALS (UNIFIED) ─── */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.modal[style*="display: block"],
.modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    background: #ffffff;
    border-radius: 1.25rem;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    padding: 2rem 1.75rem;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content .close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gray-400);
    background: transparent;
    border: none;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}
.modal-content .close:hover {
    background: var(--gray-200);
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-content h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gray-800);
    letter-spacing: -0.01em;
    padding-right: 2.5rem;
}

.modal-content .form-group:last-child {
    margin-bottom: 0;
}

.modal-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.modal-footer .btn {
    min-width: 100px;
    justify-content: center;
}

.modal-body-scroll {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.modal-body-scroll::-webkit-scrollbar {
    width: 4px;
}
.modal-body-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}

.modal-content.full-width {
    max-width: 95vw;
}
.modal-content.no-footer .modal-footer {
    display: none;
}

/* ─── Modal Form Elements ─── */
.modal-content .form-group {
    margin-bottom: 1.25rem;
}
.modal-content .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}
.modal-content .form-control {
    display: block;
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--gray-800);
    background: #ffffff;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.modal-content .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    outline: none;
    background: #ffffff;
}
.modal-content .form-control:hover {
    border-color: var(--gray-400);
}
.modal-content .form-control::placeholder {
    color: var(--gray-400);
    opacity: 1;
}
.modal-content select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px 7px;
    padding-right: 2.5rem;
    cursor: pointer;
}
.modal-content select.form-control option {
    padding: 0.5rem;
    background: white;
    color: var(--gray-800);
}
.modal-content textarea.form-control {
    resize: vertical;
    min-height: 80px;
}
.modal-content textarea.form-control:focus {
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.modal-content .form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
}
.modal-content .form-check input[type="checkbox"],
.modal-content .form-check input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: white;
    transition: all 0.15s;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}
.modal-content .form-check input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}
.modal-content .form-check input[type="checkbox"]:checked::after {
    content: "✓";
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.modal-content .form-check input[type="radio"] {
    border-radius: 50%;
}
.modal-content .form-check input[type="radio"]:checked {
    border-color: var(--primary);
    background: white;
}
.modal-content .form-check input[type="radio"]:checked::after {
    content: "";
    width: 0.625rem;
    height: 0.625rem;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.modal-content .form-check input[type="checkbox"]:focus,
.modal-content .form-check input[type="radio"]:focus {
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.modal-content .form-check label {
    font-size: 0.9rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* ─── MODALS RESPONSIVE ─── */
@media (max-width: 768px) {
    .modal {
        padding: 0.75rem;
        align-items: flex-end;
    }
    .modal-content {
        max-height: 95vh;
        border-radius: 1.25rem 1.25rem 0 0;
        padding: 1.5rem 1.25rem;
        animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    @keyframes modalSlideUp {
        from { opacity: 0; transform: translateY(40px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .modal-content h3 {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }
    .modal-content .close {
        right: 0.75rem;
        top: 0.75rem;
        width: 2rem;
        height: 2rem;
        font-size: 1.3rem;
    }
    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .modal-footer .btn {
        width: 100%;
        min-width: unset;
    }
    .modal-body-scroll {
        max-height: 55vh;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 0.5rem;
    }
    .modal-content {
        border-radius: 1rem 1rem 0 0;
        padding: 1rem;
        max-height: 98vh;
    }
    .modal-content h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    .modal-content .close {
        right: 0.5rem;
        top: 0.5rem;
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1.1rem;
    }
    .modal-body-scroll {
        max-height: 50vh;
    }
    .modal-content .form-control {
        font-size: 0.85rem;
        padding: 0.5rem 0.7rem;
    }
    .modal-content .form-group {
        margin-bottom: 1rem;
    }
}

/* ─── GUIDE MODAL ─── */
.guide-modal {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
    pointer-events: none;
}
.guide-modal .modal-content {
    pointer-events: auto;
    background: white;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

#highlightBox {
    position: absolute;
    border: 3px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3), 0 0 30px rgba(16, 185, 129, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background: rgba(255, 255, 255, 0.05);
    animation: pulseHighlight 2s ease-in-out infinite;
}

#guideDragHandle {
    cursor: grab;
    user-select: none;
    border-radius: 12px 12px 0 0;
    background: white;
    transition: background 0.15s;
}
#guideDragHandle:hover {
    background: #f8fafc;
}
#guideDragHandle:active {
    cursor: grabbing;
}
#guideDragHandle .close {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--gray-400);
    transition: var(--transition);
}
#guideDragHandle .close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

@keyframes pulseHighlight {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.3), 0 0 30px rgba(16, 185, 129, 0.2);
        border-color: var(--primary);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.25), 0 0 50px rgba(16, 185, 129, 0.4);
        border-color: var(--primary-light);
        transform: scale(1.02);
    }
}

/* ─── PAGINATION ─── */
.pagination-container {
    margin-top: 1.5rem;
}
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: nowrap;
    flex-direction: row;
}
.pagination .btn {
    min-width: 36px;
    text-align: center;
}
.pagination .btn-primary {
    cursor: default;
    opacity: 0.9;
}

/* ─── INPUT ROWS ─── */
.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.input-row select,
.input-row input {
    flex: 1;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
}
.input-row button {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
}

/* ─── NOTIFICATIONS ─── */
/*.notifications-dropdown {
    position: relative;
    display: inline-block;
}
#notificationBell {
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray-600);
}
#notificationCount {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
}
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}
#notificationCount.pulse {
    animation: pulse-badge 0.5s ease-in-out 3;
}
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 380px;
    max-width: 90vw;
    max-height: 460px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    z-index: 1000;
    animation: slideDown 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.dropdown-content.show {
    display: block;
}
.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}
.dropdown-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
}
.mark-all-read {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
}
.mark-all-read:hover {
    background: var(--primary-glow);
    text-decoration: underline;
}
.notification-list {
    max-height: 340px;
    overflow-y: auto;
    padding: 4px 0;
}
.notification-item {
    display: flex;
    padding: 10px 16px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.15s;
    gap: 12px;
    align-items: flex-start;
}
.notification-item:last-child {
    border-bottom: none;
}
.notification-item:hover {
    background: var(--gray-50);
}
.notification-item.unread {
    background: #f0fdf4;
    border-left: 3px solid var(--primary);
}
.notification-avatar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}
.notification-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.notification-avatar i {
    font-size: 1.1rem;
    color: var(--primary);
}
.notification-content {
    flex: 1;
    min-width: 0;
}
.notification-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-800);
    margin-bottom: 2px;
}
.notification-message {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notification-time {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 4px;
}
*/

/* ─── MEETINGS ─── */
.meetings-list {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-top: 20px;
}
.meeting-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.15s;
    gap: 10px;
}
.meeting-row:last-child {
    border-bottom: none;
}
.meeting-row.header {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    padding: 10px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.meeting-row:hover {
    background: var(--gray-50);
}
.meeting-row .col-title {
    font-weight: 500;
    color: var(--gray-800);
}
.meeting-row .col-date,
.meeting-row .col-time {
    color: var(--gray-600);
    font-size: 0.9rem;
}
.meeting-row .col-status .badge {
    font-size: 0.75rem;
    padding: 3px 10px;
}
.meeting-row .col-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.meeting-row .col-actions .btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* ─── SCROLLBARS (HIDDEN) ─── */
::-webkit-scrollbar {
    display: none;
}
* {
    scrollbar-width: none;
}
.sidebar::-webkit-scrollbar,
.table-container::-webkit-scrollbar,
.activity-table-container::-webkit-scrollbar {
    display: none;
}
.sidebar,
.table-container,
.activity-table-container {
    scrollbar-width: none;
}

/* ─── CARD IMPROVEMENTS ─── */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    overflow: hidden;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-body {
    padding: 1.5rem;
}
.card-header {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
}
.card-footer {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* ─── PAGE HEADER ─── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.page-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}
.page-header .action-buttons {
    margin: 0;
}

/* ─── UTILITY CLASSES ─── */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 1rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 1rem; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 2rem; }
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.rounded-circle { border-radius: 50%; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .sidebar { width: 240px; }
    .sidebar.collapsed ~ .main-content { margin-left: 80px; }
    .main-content { margin-left: 260px; width: 0; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        width: 260px;
        z-index: 40;
        border-radius: 0 24px 24px 0;
    }
    .sidebar.active { transform: translateX(0); }
    .close-sidebar { display: block; }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .content { padding: 1rem; }
    .dashboard-cards { grid-template-columns: 1fr; gap: 1rem; }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .filter-row > *,
    .filter-row input,
    .filter-row select,
    .filter-row .btn {
        width: 100%;
        flex: 1 1 auto;
    }
    .action-buttons { justify-content: flex-start; }

    .card-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }
    .card-info p { font-size: 1.4rem; }

    .table-container,
    .activity-table-container { overflow-x: auto; }
    .table th,
    .table td,
    .activity-table th,
    .activity-table td { white-space: nowrap; }

    .pagination { flex-wrap: wrap; gap: 6px; }
    .dashboard-row { flex-direction: column; gap: 1rem; }
    .chart-container { padding: 0.75rem; margin: 1rem 0; }

    .dropdown-content {
        width: calc(100vw - 32px);
        right: 16px;
        left: 16px;
        max-height: 70vh;
    }
    .notification-list {
        max-height: 50vh;
    }
    .notification-item {
        padding: 10px 12px;
    }
    .notification-title {
        font-size: 0.85rem;
    }
    .notification-message {
        font-size: 0.8rem;
    }

    .input-row {
        flex-direction: column;
        align-items: stretch;
    }
    .input-row select,
    .input-row input,
    .input-row button {
        width: 100%;
        margin: 4px 0;
    }

    .btn { padding: 6px 14px; font-size: 0.8rem; }
    .pagination .btn-sm { padding: 3px 10px; font-size: 0.7rem; }

    .warehouse-switcher select {
        min-width: 100px;
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    .warehouse-label {
        font-size: 0.75rem;
        padding: 3px 8px;
        margin-right: 6px;
    }
    .header-right { gap: 10px; }

    .meeting-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 14px 16px;
    }
    .meeting-row.header { display: none; }
    .meeting-row .col-actions { justify-content: flex-start; margin-top: 6px; }
    .meeting-row .col-title { font-weight: 600; font-size: 1rem; }
    .meeting-row .col-date,
    .meeting-row .col-time,
    .meeting-row .col-status {
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    .meeting-row .col-date::before { content: "📅 "; }
    .meeting-row .col-time::before { content: "🕒 "; }
    .meeting-row .col-status::before { content: "Status: "; }

    .header-mobile-toggle {
        display: inline-block;
    }
    .header-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        right: 0px;
        background: white;
        flex-direction: column;
        align-items: stretch;
        box-shadow: var(--shadow-lg);
        border-radius: var(--radius-md);
        padding: 0.5rem 1.0rem;
        min-width: 220px;
        z-index: 50;
        border: 1px solid var(--gray-200);
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(4px);
    }
    .header-dropdown.open {
        display: flex;
        flex-direction: row;
        min-width: 220px;
    }
    .header-dropdown .warehouse-switcher,
    .header-dropdown,
    .header-dropdown .btn,
    .header-dropdown .welcome-text,
    .header-dropdown .btn-logout {
        margin: 6px 0;
        justify-content: flex-start;
    }
    .header-dropdown .warehouse-switcher select {
        width: 100%;
        min-width: max-content;
    }
    .header-dropdown {
        position: absolute;
    }
    .header-dropdown .dropdown-content {
        position: fixed;
        top: 60px;
        left: 5%;
        right: 5%;
        width: 90%;
    }
    .header-dropdown .welcome-text a {
        display: block;
        padding: 4px 0;
    }
}

@media (max-width: 480px) {
    .header-left h2 { font-size: 1rem; }
    .welcome-text { display: none; }
    .btn { padding: 6px 12px; font-size: 0.75rem; }
    .card { padding: 0.875rem; }
    .card-info p { font-size: 1.2rem; }

    .warehouse-switcher select {
        min-width: 80px;
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    .warehouse-label {
        font-size: 0.7rem;
        padding: 2px 8px;
        display: inline-block;
    }
    .dropdown-header h4 {
        font-size: 0.85rem;
    }
    .mark-all-read {
        font-size: 0.7rem;
        padding: 2px 10px;
    }

    .form-control {
        font-size: 0.85rem;
        padding: 0.55rem 0.8rem;
    }
    .form-check {
        gap: 0.5rem;
    }
    .btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        width: auto;
        justify-content: center;
    }
    .action-buttons .btn {
        width: auto;
    }
    .form-check-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .sidebar,
    .header,
    .btn,
    .modal,
    .filter-form,
    .action-buttons,
    .menu-toggle,
    .close-sidebar,
    .no-print {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        background: white;
        width: 100% !important;
    }
    .table {
        border: 1px solid #000;
    }
    .table th {
        background: #eee !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .badge {
        border: 1px solid #000;
        background: none !important;
        color: #000 !important;
    }
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
    .page-header .action-buttons {
        display: none !important;
    }
}

/* ─── Notification Type Colors ────────────────────────────────────── */
.notification-item.notif-meeting {
    border-left: 4px solid #8b5cf6 !important;
    background: #f3e8ff;
}
.notification-item.notif-security {
    border-left: 4px solid #ef4444 !important;
    background: #fee2e2;
}
.notification-item.notif-release {
    border-left: 4px solid #f59e0b !important;
    background: #fef3c7;
}
.notification-item.notif-update {
    border-left: 4px solid #3b82f6 !important;
    background: #dbeafe;
}
.notification-item.notif-approval {
    border-left: 4px solid #10b981 !important;
    background: #d1fae5;
}
.notification-item.notif-dispatch {
    border-left: 4px solid #ec4899 !important;
    background: #fce7f3;
}
.notification-item.notif-general {
    border-left: 4px solid #6b7280 !important;
    background: #f3f4f6;
}
.notification-item.notif-default {
    border-left: 4px solid #9ca3af !important;
    background: #ffffff;
}

/* Keep unread style override (if needed) */
.notification-item.unread {
    background: var(--gray-50); /* fallback – but the inline style will override */
}

.view-all-link {
    font-size: 0.75rem;
    font-weight: 500;
    transition: color 0.2s;
}
.view-all-link:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}
