@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    --bg-dark: #121212;
    --bg-card: #1c1c1c;
    --primary: #e56d1f;
    --primary-hover: #f1792a;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --border-color: #333333;
    
    --glass-bg: rgba(28, 28, 28, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
}

.text-primary {
    color: var(--primary);
}

.text-muted {
    color: var(--text-muted);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    border-bottom: 1px solid var(--border-color);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-section img {
    height: 50px;
    border-radius: 8px;
}

.logo-text h1 {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1;
}

.logo-text p {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

nav ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 5px;
}

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

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(229, 109, 31, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 109, 31, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-cancel {
    background: #1a1a1a;
    color: #a3a3a3;
    border: 1px solid #2d2d2d;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.btn-cancel:hover {
    background: #242424;
    color: #ffffff;
    border-color: #444444;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
    padding: 0 5%;
}

.hero-content {
    flex: 1;
    max-width: 50%;
}

.hero-content h2 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 80%;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-image-wrapper {
    position: relative;
    width: 500px;
    height: 500px;
    border-radius: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--primary);
    box-shadow: 0 0 40px rgba(229, 109, 31, 0.15);
    overflow: hidden;
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Branches */
.branches {
    margin-top: 40px;
}

.branches-title {
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
}

.branch-cards {
    display: flex;
    gap: 20px;
}

.branch-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 20px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
}

.branch-card:hover, .branch-card.active {
    background: rgba(229, 109, 31, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

/* Auth Pages (White Theme -> Split Screen) */
.auth-wrapper {
    background: var(--bg-dark);
    min-height: 100vh;
    display: flex;
}

.split-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.split-right {
    flex: 1;
    background-image: url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    position: relative;
}
.split-right::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(229,109,31,0.2) 0%, rgba(18,18,18,0.8) 100%);
}

.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    text-align: center;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
    border: 2px solid var(--primary);
    padding: 5px;
    background: white;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 30px;
}

.auth-tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.auth-tab {
    flex: 1;
    padding: 15px 0;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s;
}

.auth-tab.active {
    background: var(--primary);
    color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(229, 109, 31, 0.3);
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    color: white;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 109, 31, 0.1);
}

.btn-block {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border-radius: 10px;
    margin-top: 10px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1; /* Makes it perfectly round/square depending on border radius */
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(229, 109, 31, 0.15);
}

.dashboard-card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.dashboard-card-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ===== PAGE LAYOUT ===== */
.page-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 30px 24px 60px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 1.8rem;
    font-family: 'Playfair Display', serif;
    margin: 0;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ===== ALERTS ===== */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-weight: 500;
    transition: opacity 0.5s ease;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    gap: 14px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.search-input, .filter-select {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.search-input { flex: 1; min-width: 220px; }
.filter-select { min-width: 160px; }

.search-input:focus, .filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== DATA TABLE ===== */
.data-table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead tr {
    background: rgba(229, 109, 31, 0.08);
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
    white-space: nowrap;
}

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

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

/* ===== TABLE ELEMENTS ===== */
.table-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.thumb-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: rgba(229, 109, 31, 0.1);
    border: 1px solid rgba(229, 109, 31, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.fw-600 { font-weight: 600; }
.d-block { display: block; }

.badge-count {
    background: rgba(229, 109, 31, 0.15);
    color: var(--primary);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.82rem;
    font-weight: 600;
}

.badge-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-green {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
}

.badge-red {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.category-chip {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 0.82rem;
}

.stock-ok { color: #4ade80; font-weight: 600; }
.stock-low { color: #fb923c; font-weight: 600; }
.stock-empty { color: #f87171; font-weight: 600; }

/* ===== ACTION BUTTONS ===== */
.action-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-edit {
    background: rgba(229, 109, 31, 0.12);
    color: var(--primary);
}

.btn-edit:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.08);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.08);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 4rem;
    color: rgba(229, 109, 31, 0.3);
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    font-size: 1.4rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    background: #1e1e1e;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.25s ease;
}

.modal-box.modal-lg {
    max-width: 740px;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 26px 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239,68,68,0.3);
}

.modal-body {
    padding: 22px 26px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 26px 22px;
    border-top: 1px solid var(--border-color);
}

/* ===== FORM ELEMENTS (modal) ===== */
.modal-body .form-group label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 7px;
}

.modal-body .form-group input,
.modal-body .form-group select,
.modal-body .form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
    resize: vertical;
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus,
.modal-body .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 109, 31, 0.08);
}

.modal-body .form-group select option {
    background: #1e1e1e;
    color: var(--text-main);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.required { color: var(--primary); }

/* ===== FILE UPLOAD ===== */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.file-upload-area:hover {
    border-color: var(--primary);
    background: rgba(229, 109, 31, 0.05);
    color: var(--primary);
}

.file-upload-area i { font-size: 1.5rem; }

.img-preview {
    margin-top: 12px;
    width: 100%;
    max-height: 140px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* ===== AVAILABILITY TOGGLE ===== */
.avail-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    border: 2px solid rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.07);
    cursor: pointer;
    transition: border-color 0.3s, background 0.3s;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

.avail-toggle-wrap.is-on {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.07);
}

/* The pill track */
.avail-track {
    position: relative;
    width: 50px;
    height: 26px;
    border-radius: 13px;
    background: rgba(239, 68, 68, 0.35);
    border: 1.5px solid #ef4444;
    flex-shrink: 0;
    transition: background 0.3s, border-color 0.3s;
    overflow: hidden;
}

.avail-toggle-wrap.is-on .avail-track {
    background: rgba(34, 197, 94, 0.35);
    border-color: #22c55e;
}

/* The thumb dot */
.avail-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    transition: transform 0.3s, background 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.avail-toggle-wrap.is-on .avail-thumb {
    transform: translateX(24px);
    background: #22c55e;
}

/* Text label */
.avail-label-text {
    font-size: 0.92rem;
    font-weight: 600;
    color: #f87171;
    transition: color 0.3s;
    white-space: nowrap;
}

.avail-toggle-wrap.is-on .avail-label-text {
    color: #4ade80;
}

.avail-icon {
    font-size: 0.9rem;
    margin-right: 5px;
}

/* Nav logo fix */
.nav-logo {
    text-decoration: none;
    color: var(--text-main);
}

.nav-logo-text-group {
    display: flex;
    flex-direction: column;
}

.logo-text-suffix {
    color: var(--primary);
}

/* ===== FORM PAGE STYLES ===== */
.back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.form-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.form-section-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-field {
    margin-bottom: 18px;
}

.form-field:last-child {
    margin-bottom: 0;
}

.field-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.field-input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.field-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(229, 109, 31, 0.08);
}

select.field-input option {
    background: #1e1e1e;
    color: var(--text-main);
}

.field-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 32px;
}

/* ===== MOBILE RESPONSIVE MEDIA QUERIES ===== */
@media screen and (max-width: 768px) {
    /* Header & Navigation */
    header {
        flex-direction: column;
        gap: 16px;
        padding: 15px;
        text-align: center;
    }
    .logo-section {
        flex-direction: column;
        gap: 8px;
    }
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 20px;
    }
    .header-actions {
        width: 100%;
        justify-content: center;
        margin-top: 5px;
    }

    /* Hero Section */
    .hero {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding: 40px 15px;
        gap: 30px;
    }
    .hero-content {
        max-width: 100%;
    }
    .hero-content h2 {
        font-size: 2.4rem;
    }
    .hero-content p {
        font-size: 1rem;
        max-width: 100%;
        margin-bottom: 25px;
    }
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 12px;
    }
    .hero-image {
        justify-content: center;
        width: 100%;
    }
    .hero-image-wrapper {
        width: 290px;
        height: 290px;
    }
    .branch-cards {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    .branch-card {
        width: 100%;
        text-align: center;
    }

    /* Auth Page Split Screen */
    .auth-wrapper {
        flex-direction: column;
    }
    .split-right {
        display: none; /* Hide image background on mobile to focus on form */
    }
    .split-left {
        padding: 16px;
        min-height: 100vh;
    }
    .auth-card {
        padding: 24px 16px;
        border-radius: 16px;
    }
    .auth-title {
        font-size: 1.6rem;
    }

    /* Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 20px 0;
    }
    .dashboard-card {
        padding: 24px 12px;
        aspect-ratio: auto;
        min-height: 120px;
        border-radius: 16px;
    }
    .dashboard-card-icon {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }
    .dashboard-card-title {
        font-size: 0.88rem;
    }

    /* Page Layout */
    .page-container {
        padding: 20px 16px 40px;
    }
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
        text-align: left;
    }
    .page-header > div {
        width: 100%;
    }
    .page-header .btn-primary {
        text-align: center;
        width: 100%;
        padding: 12px;
    }
    .page-title {
        font-size: 1.5rem;
    }

    /* Filter Bar */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .search-input, .filter-select {
        width: 100%;
        min-width: 100%;
    }

    /* Data Table (Horizontal Scroll) */
    .data-table-wrapper {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
    }
    .data-table {
        width: max-content !important;
        min-width: 100% !important;
        table-layout: auto !important;
    }
    .data-table th, .data-table td {
        white-space: nowrap !important;
        padding: 12px 16px !important;
    }

    /* Forms */
    .form-section {
        padding: 16px;
    }
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .form-actions {
        flex-direction: column-reverse;
        gap: 10px;
        margin-top: 24px;
    }
    .form-actions .btn-outline,
    .form-actions .btn-primary {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 12px;
    }

    /* Ingredients Table Wrapper (Recipe Creator) */
    .ingredients-table-wrapper {
        width: 100%;
        overflow-x: auto;
        padding: 10px;
        -webkit-overflow-scrolling: touch;
    }
    #ingredientsTable {
        min-width: 650px;
    }
}

/* Custom Mobile UI Overrides */
@media screen and (max-width: 768px) {
    .top-navbar {
        padding: 0 15px !important;
        height: 60px !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    .content-body {
        padding: 15px !important;
    }
    .page-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
        margin-bottom: 20px !important;
    }
    .page-header .btn-primary, 
    .page-header .btn-outline {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }
    .form-grid-3, .form-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .alert {
        padding: 12px !important;
        font-size: 0.85rem !important;
    }
    .data-table-wrapper {
        margin-top: 15px !important;
        box-shadow: none !important;
    }
    .grid-card {
        padding: 15px !important;
    }
    .form-section {
        padding: 15px !important;
    }
}

/* Collapsible Sidebar Styles */
:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 0px;
}

.app-layout {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Left Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: #181818;
    border-right: 1px solid #2a2a2a;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

.sidebar-header {
    height: 70px;
    padding: 0 12px 0 14px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #2e2e2e;
    color: #a3a3a3;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary, #f97316);
    border-color: rgba(249, 115, 22, 0.35);
}

.sidebar-logo {
    height: 36px;
    border-radius: 6px;
    flex-shrink: 0;
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    font-family: 'Playfair Display', serif;
    white-space: nowrap;
}

.sidebar-brand span {
    color: var(--primary, #f97316);
}

.sidebar-menu {
    flex: 1;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

/* Custom Scrollbar for Sidebar Menu */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}
.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}
.sidebar-menu::-webkit-scrollbar-thumb:hover {
}

/* Sidebar Bottom Profile Footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid #2a2a2a;
    background: #141414;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.sidebar-user-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #f97316), #e56d1f);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sidebar-user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    color: #a3a3a3;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-icon {
    color: #737373;
    font-size: 0.85rem;
    transition: color 0.2s ease;
    margin-left: auto;
}

.sidebar-user-card:hover .sidebar-profile-icon {
    color: var(--primary, #f97316);
}

.sidebar-logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sidebar-logout-btn:hover {
    background: #ef4444;
    color: #fff;
    border-color: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #a3a3a3;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.08));
    border: 1px solid var(--primary, #f97316);
    color: #ffffff;
    font-weight: 600;
}

.menu-item.active i {
    color: var(--primary, #f97316);
}

/* Form Required Asterisk */
.required {
    color: #ef4444; /* Tailwind red-500 */
    font-weight: bold;
    margin-left: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333;
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary, #f97316);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

/* Sidebar Module Group Accordions */
.menu-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 4px;
}

.menu-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 8px;
    color: #a3a3a3;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    user-select: none;
}

.menu-group-header:hover {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.menu-group-header.active {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    border-left: 3px solid var(--primary, #f97316);
}

.menu-group-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.menu-group-title i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: var(--primary, #f97316);
}

.menu-chevron {
    font-size: 0.8rem;
    transition: transform 0.25s ease;
    color: #737373;
}

.menu-group.open .menu-chevron {
    transform: rotate(180deg);
}

.menu-sub-items {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 10px;
    margin-top: 4px;
    border-left: 2px solid rgba(255, 255, 255, 0.08);
    margin-left: 26px;
}

.menu-group.open > .menu-sub-items {
    display: flex;
}

.menu-sub-items .menu-item {
    padding: 9px 14px;
    font-size: 0.9rem;
}

/* Main Container */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}

/* Top Navigation Header */
.top-navbar {
    background: #181818;
    border-bottom: 1px solid #2a2a2a;
    height: 70px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hamburger-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary, #f97316);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    color: #a3a3a3;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-btn {
    background: none;
    border: 1px solid #333;
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.logout-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* Page Content Body */
.content-body {
    flex: 1;
    padding: 30px;
}

/* Collapsed Sidebar State styling */
.sidebar-collapsed .sidebar {
    transform: translateX(-100%);
}

.sidebar-collapsed .main-container {
    margin-left: 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-container {
        margin-left: 0;
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-overlay {
        display: block;
    }
}

/* Sidebar Overlay (Mobile only) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 998;
}

/* Modern Glassmorphic Loader Overlay */
.global-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(12, 12, 12, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.global-loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-card {
    background: rgba(22, 22, 22, 0.88);
    border: 1px solid rgba(249, 115, 22, 0.25);
    border-radius: 14px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(249, 115, 22, 0.1);
}

.loader-logo {
    height: 38px;
    border-radius: 6px;
    animation: pulseLogo 1.2s infinite ease-in-out;
}

.loader-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid rgba(249, 115, 22, 0.2);
    border-top-color: var(--primary, #f97316);
    border-radius: 50%;
    animation: spinLoader 0.7s linear infinite;
}

.loader-text {
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.05); opacity: 1; filter: drop-shadow(0 0 8px rgba(249, 115, 22, 0.4)); }
}

/* ===== CUSTOM SCROLLBARS ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #141414;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #2d2d2d;
    border-radius: 10px;
    border: 2px solid #141414;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary, #f97316);
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #2d2d2d #141414;
}

.grid-layout-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    align-items: start;
}

.form-grid-1-1 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media screen and (max-width: 992px) {
    .grid-layout-1-2 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

@media screen and (max-width: 768px) {
    .form-grid-1-1 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
}

/* Custom Date and Timepicker Calendar Icon Styling */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}




