/* ============================================
   Flavor Admin Panel - Professional SaaS Theme
   ============================================ */

:root {
    --sidebar-bg: #5a7247;
    --sidebar-hover: #4d6340;
    --sidebar-active: rgba(212, 160, 74, 0.15);
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --navbar-height: 0px;
    --accent: #d4a04a;
    --accent-hover: #c69038;
    --accent-light: rgba(212, 160, 74, 0.1);
    --content-bg: #f8e9da;
    --card-bg: #fff8f0;
    --text-primary: #d4a04a;
    --text-secondary: #c49a52;
    --text-muted: #c4aa70;
    --border-color: #ddcfc4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition-speed: 0.25s;
}

/* ===== Base ===== */
body {
    font-family: var(--font-family);
    background-color: var(--content-bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 0 1px 2px rgba(0,0,0,0.08);
    background-image:
        repeating-linear-gradient(90deg, transparent, transparent 18px, rgba(90, 114, 71, 0.04) 18px, rgba(90, 114, 71, 0.04) 20px),
        repeating-linear-gradient(0deg, transparent, transparent 60px, rgba(90, 114, 71, 0.03) 60px, rgba(90, 114, 71, 0.03) 61px),
        repeating-linear-gradient(90deg, transparent, transparent 38px, rgba(180, 160, 100, 0.03) 38px, rgba(180, 160, 100, 0.03) 40px);
}

h1, h2, h3, h4, h5, h6 {
    text-shadow: 1px 1px 0 rgba(0,0,0,0.15), 2px 2px 4px rgba(0,0,0,0.1);
}

/* ===== Top Navbar ===== */
.navbar {
    z-index: 1100;
    height: var(--navbar-height);
    display: none !important;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1050;
    transition: width var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

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

/* Sidebar Brand Logo */
.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.25rem 1rem;
    text-decoration: none;
    color: #fff;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.5rem;
}

.sidebar-brand-icon {
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    transition: border-radius var(--transition-speed) ease;
}

.sidebar-brand-text {
    margin-left: 0.75rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    opacity: 1;
    transition: opacity var(--transition-speed) ease, margin var(--transition-speed) ease;
}

/* Sidebar Section Labels */
.sidebar-section-label {
    display: block;
    padding: 1.25rem 1.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--transition-speed) ease;
}

/* Sidebar Nav Links */
.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.25rem;
    margin: 1px 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65) !important;
    border-radius: 8px;
    border-left: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    position: relative;
}

.sidebar .nav-link i {
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: margin var(--transition-speed) ease;
}

.sidebar .nav-link .nav-label {
    margin-left: 0.75rem;
    opacity: 1;
    transition: opacity var(--transition-speed) ease;
}

.sidebar .nav-link:hover {
    color: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.06);
}

.sidebar .nav-link.active {
    color: var(--accent) !important;
    background-color: var(--sidebar-active);
    font-weight: 600;
}

.sidebar .nav-link.active i {
    color: var(--accent);
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-footer .btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.15s ease;
    text-decoration: none;
    justify-content: flex-start;
}

.sidebar-footer .btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-footer .btn .nav-label {
    margin-left: 0.5rem;
    opacity: 1;
    transition: opacity var(--transition-speed) ease;
}

/* Sidebar Collapse Toggle */
.sidebar-collapse-btn {
    position: absolute;
    top: 1.25rem;
    right: -12px;
    width: 24px;
    height: 24px;
    background: var(--sidebar-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1060;
    color: var(--text-secondary);
    font-size: 0.65rem;
    transition: all 0.15s ease;
    padding: 0;
}

.sidebar-collapse-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.sidebar-collapse-btn i {
    transition: transform var(--transition-speed) ease;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-footer .nav-label {
    opacity: 0;
    pointer-events: none;
}

.sidebar.collapsed .sidebar-brand {
    padding: 1.25rem 0.95rem 1rem;
    justify-content: center;
}

.sidebar.collapsed .sidebar-brand-text {
    width: 0;
    margin-left: 0;
}

.sidebar.collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.6rem;
    margin: 1px 0.5rem;
}

.sidebar.collapsed .nav-link i {
    margin: 0;
    font-size: 1.15rem;
}

.sidebar.collapsed .sidebar-footer .btn {
    justify-content: center;
    padding: 0.6rem;
}

/* Sidebar collapsed tooltip on hover */
.sidebar.collapsed .nav-link {
    position: relative;
}

.sidebar.collapsed .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-primary);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 1100;
}

.sidebar.collapsed .nav-link:hover::after {
    opacity: 1;
}

/* ===== Content Area ===== */
.content-area {
    margin-left: var(--sidebar-width);
    margin-top: 0;
    min-height: 100vh;
    background-color: var(--content-bg);
    transition: margin-left var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ #sidebarBackdrop ~ .content-area,
.sidebar.collapsed ~ .content-area {
    margin-left: var(--sidebar-collapsed-width);
}

.content-area > .container-fluid {
    max-width: 1400px;
    padding: 2rem 2.5rem;
}

/* ===== Top Bar inside Content ===== */
.content-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.content-topbar .topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.content-topbar .topbar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 1.75rem;
}

.page-header-flex {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin-bottom: 0;
    line-height: 1.3;
}

.page-header .page-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
    padding: 0;
    background: transparent;
}

.breadcrumb-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

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

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* ===== Cards General ===== */
.card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    background: var(--card-bg);
    transition: box-shadow 0.2s ease;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* ===== KPI / Stat Cards ===== */
.kpi-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.kpi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kpi-icon.kpi-blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.kpi-icon.kpi-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.kpi-icon.kpi-orange {
    background: var(--accent-light);
    color: var(--accent);
}

.kpi-icon.kpi-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.kpi-content {
    flex: 1;
    min-width: 0;
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.kpi-footer {
    margin-top: 0.5rem;
}

.kpi-footer a {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.kpi-footer a:hover {
    color: var(--accent-hover);
}

/* ===== Quick Actions ===== */
.quick-action-card {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.15s ease;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.quick-action-card:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.quick-action-card i {
    font-size: 1rem;
    color: var(--text-secondary);
    transition: color 0.15s ease;
}

.quick-action-card:hover i {
    color: var(--accent);
}

/* ===== Tables ===== */
.table-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-top: none;
    border-bottom: 2px solid var(--border-color);
    background: #fafbfc;
    padding: 0.875rem 1.25rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-color: var(--border-color);
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(212, 160, 74, 0.03);
}

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

/* ===== Badges ===== */
.badge {
    font-weight: 600;
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.badge-status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-loyalty-yes {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-loyalty-no {
    background: #f3f4f6;
    color: #9ca3af;
}

.badge-count {
    background: #f3f4f6;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 28px;
    text-align: center;
}

/* ===== Buttons ===== */
.btn-accent {
    background-color: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.btn-accent:hover {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 2px 8px rgba(212, 160, 74, 0.3);
}

.btn-accent:active,
.btn-accent:focus {
    background-color: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

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

.btn-outline-primary:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
}

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

/* ===== Search / Filter Bar ===== */
.search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.search-bar .form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.875rem 0.5rem 2.5rem;
    font-size: 0.875rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
}

.search-bar .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* ===== Forms ===== */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 0.875rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.form-text,
.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

textarea.form-control {
    min-height: 100px;
}

/* Toggle Switch */
.form-switch-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: #fafbfc;
    transition: all 0.15s ease;
    cursor: pointer;
}

.form-switch-custom:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.form-switch-custom .form-check-input {
    width: 2.5rem;
    height: 1.35rem;
    margin: 0;
    cursor: pointer;
    border: 2px solid #d1d5db;
    background-color: #e5e7eb;
    transition: all 0.15s ease;
}

.form-switch-custom .form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-switch-custom .form-check-input:focus {
    box-shadow: 0 0 0 3px var(--accent-light);
}

.form-switch-custom .switch-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-switch-custom .switch-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Form section headers */
.form-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* ===== Pagination ===== */
.pagination {
    gap: 0.25rem;
}

.pagination .page-link {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    min-width: 36px;
    text-align: center;
    transition: all 0.15s ease;
}

.pagination .page-link:hover {
    background: var(--accent-light);
    border-color: var(--accent);
    color: var(--accent);
}

.pagination .page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background: #f9fafb;
    color: var(--text-muted);
}

/* ===== Alerts ===== */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.875rem 1.25rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

/* ===== Empty State ===== */
.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.95rem;
    margin: 0;
}

/* ===== Sidebar Backdrop (mobile) ===== */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1040;
}

.sidebar-backdrop.show {
    display: block;
}

/* ===== Mobile Toggle (visible on small screens) ===== */
.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1030;
    align-items: center;
    padding: 0 1rem;
}

.mobile-topbar .mobile-toggle {
    border: none;
    background: transparent;
    font-size: 1.25rem;
    color: var(--text-primary);
    padding: 0.25rem;
    cursor: pointer;
}

.mobile-topbar .mobile-brand {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-left: 0.75rem;
}

/* ===== Responsive ===== */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: var(--sidebar-width) !important;
    }

    .sidebar-collapse-btn {
        display: none;
    }

    .content-area {
        margin-left: 0 !important;
        margin-top: 56px;
    }

    .content-area > .container-fluid {
        padding: 1.25rem;
    }

    .mobile-topbar {
        display: flex;
    }

    .page-header-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .page-header-flex .btn-accent {
        align-self: stretch;
        text-align: center;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    .col-lg-8,
    .col-lg-10 {
        width: 100%;
        max-width: 100%;
    }

    .kpi-card {
        padding: 1.25rem;
    }

    .search-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 991.98px) and (min-width: 768px) {
    .sidebar:not(.collapsed) {
        width: 220px;
    }

    .sidebar:not(.collapsed) ~ .content-area,
    .sidebar:not(.collapsed) ~ #sidebarBackdrop ~ .content-area {
        margin-left: 220px;
    }
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--sidebar-bg);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 160, 74, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 160, 74, 0.06) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: auto;
    padding: 2rem;
}

.login-card {
    background: #fff8f0;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: none;
}

.login-brand {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.login-brand-icon {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.login-brand h3 {
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--text-primary);
    margin: 0;
}

.login-brand p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0.35rem 0 0;
}

.login-form-body {
    padding: 0 2rem 2rem;
}

.login-form-body .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.login-form-body .form-control {
    padding: 0.7rem 0.875rem;
    border-radius: 10px;
}

.btn-login {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.7rem;
    font-size: 0.95rem;
    transition: all 0.15s ease;
}

.btn-login:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    box-shadow: 0 4px 12px rgba(212, 160, 74, 0.35);
}

.login-footer {
    text-align: center;
    padding: 1rem 2rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

/* ===== Utilities ===== */
.text-accent {
    color: var(--accent) !important;
}

.bg-accent-light {
    background-color: var(--accent-light) !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.gap-3 {
    gap: 1rem !important;
}

/* ============================================
   Menu & Outlet Management Components
   ============================================ */

/* ===== Page Title ===== */
.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
    margin-bottom: 0;
    line-height: 1.3;
}

/* ===== Breadcrumb Small ===== */
.breadcrumb-sm {
    font-size: 0.78rem;
    margin-bottom: 0.35rem;
}

/* ===== Filter Card ===== */
.filter-card {
    border-left: 3px solid var(--accent);
}

.filter-card .form-label-sm {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

/* ===== Admin Table ===== */
.admin-table thead {
    background-color: #fafbfc;
}

.admin-table thead th {
    padding: 0.85rem 1.25rem;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 0.85rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
}

.admin-table tbody tr {
    transition: background-color 0.15s ease;
}

.admin-table tbody tr:hover {
    background-color: rgba(212, 160, 74, 0.03);
}

/* ===== Status Badges ===== */
.status-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35em 0.75em;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

.status-active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.status-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.status-86d {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

/* ===== Allergen Tags ===== */
.allergen-tag {
    font-size: 0.65rem;
    font-weight: 500;
    padding: 0.2em 0.5em;
    border-radius: 4px;
}

.allergen-tag-lg {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.4em 0.75em;
    border-radius: 6px;
}

/* ===== Item Icon Box ===== */
.item-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ===== Outlet Icon Box ===== */
.outlet-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--info);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.outlet-code {
    font-size: 0.8rem;
    background-color: #f3f4f6;
    padding: 0.2em 0.5em;
    border-radius: 4px;
    color: var(--text-secondary);
}

/* ===== Service Icons (Outlets) ===== */
.service-icon-badge {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.service-icon-badge.service-active {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.service-icon-badge.service-inactive {
    background: #f3f4f6;
    color: #d1d5db;
}

/* ===== Service Toggle Cards ===== */
.service-toggle-card {
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    transition: all 0.2s ease;
}

.service-toggle-card:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.service-toggle-card .form-check-input:checked ~ .form-check-label {
    color: var(--text-primary);
}

/* ===== Icon Buttons ===== */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

/* ===== Currency Prefix ===== */
.currency-prefix {
    background-color: var(--accent);
    color: #fff;
    font-weight: 700;
    border-color: var(--accent);
}

/* ===== Price Display ===== */
.price-display {
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
}

.price-display-lg {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.75rem;
    letter-spacing: -0.025em;
}

/* ===== Detail Grid ===== */
.detail-grid {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: flex;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    width: 150px;
    min-width: 150px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.detail-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ===== Detail Sidebar Card ===== */
.detail-sidebar-card {
    background: linear-gradient(135deg, #fafbfc 0%, #f3f4f6 100%);
}

.item-detail-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background-color: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

/* ===== Modifier Group Card ===== */
.modifier-group-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    background-color: #fafbfc;
}

.modifier-group-card:last-child {
    margin-bottom: 0 !important;
}

/* ===== Category Row ===== */
.category-parent {
    border-left: 3px solid transparent;
    transition: border-color 0.15s ease;
}

.category-parent:hover {
    border-left-color: var(--accent);
}

.category-child {
    background-color: #fafbfc;
}

/* ===== Allergen Checkbox Card ===== */
.allergen-check {
    padding: 0.5rem 0.75rem 0.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.15s ease;
    background-color: #fafbfc;
}

.allergen-check:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
}

.allergen-check .form-check-input:checked ~ .form-check-label {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== Form Switch Accent ===== */
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.25rem var(--accent-light);
}

/* ===== Empty State Enhancements ===== */
.empty-state .empty-state-icon {
    font-size: 3rem;
    color: #d1d5db;
}

.empty-state-icon {
    color: #d1d5db;
}

/* ===== Input Group Styling ===== */
.input-group-text {
    background-color: #f8f9fa;
    border-color: var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Detail Grid Mobile ===== */
@media (max-width: 767.98px) {
    .detail-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .detail-label {
        width: 100%;
        min-width: unset;
    }
}

/* ============================================================
   TABLET & MOBILE RESPONSIVE FIXES (2026-03)
   ============================================================ */

/* -- Tablet (768-991px) -- */
@media (max-width: 991.98px) and (min-width: 768px) {
    /* Search bar fix — stack on tablet */
    .search-bar {
        flex-wrap: wrap;
    }
    .search-bar .form-control {
        flex: 1 1 100%;
        margin-bottom: 0.5rem;
    }
    .search-bar .btn {
        flex: 1 1 auto;
    }

    /* Filter card spacing */
    .filter-card .row > [class*="col"] {
        margin-bottom: 0.75rem;
    }

    /* KPI cards — 2 per row */
    .row > .col-xl-3.col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Increase touch targets */
    .btn-icon {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .btn-sm {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }

    /* Table action buttons */
    .admin-table .btn-icon {
        width: 44px;
        height: 44px;
    }

    /* Content padding */
    .content-area > .container-fluid {
        padding: 1.5rem 1.75rem;
    }
}

/* -- Mobile improvements -- */
@media (max-width: 767.98px) {
    /* Touch targets */
    .btn-icon {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .btn-sm {
        min-height: 44px;
    }

    /* KPI cards stack full width */
    .kpi-card {
        padding: 1rem;
    }

    .kpi-value {
        font-size: 1.5rem;
    }

    /* Table responsiveness */
    .table-card {
        border-radius: 8px;
    }

    .admin-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    .admin-table thead th {
        padding: 0.75rem 1rem;
        font-size: 0.7rem;
    }

    /* Form controls */
    .form-control, .form-select {
        min-height: 44px;
    }

    /* Modal on mobile */
    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1.25rem;
    }

    /* Quick actions — stack */
    .quick-action-card {
        padding: 0.75rem 1rem;
        min-height: 48px;
    }
}

/* -- Small mobile (max 576px) -- */
@media (max-width: 576px) {
    .page-header h1 {
        font-size: 1.35rem;
    }

    .kpi-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .content-area > .container-fluid {
        padding: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
    }

    .card-body {
        padding: 1rem;
    }
}


/* ===== Toast Notifications ===== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.flavor-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 440px;
    padding: 14px 18px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d2a26;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
    border-left: 4px solid #6366f1;
}

.flavor-toast-in {
    transform: translateX(0);
    opacity: 1;
}

.flavor-toast-out {
    transform: translateX(120%);
    opacity: 0;
}

.flavor-toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.flavor-toast-message {
    flex: 1;
    line-height: 1.4;
}

.flavor-toast-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 2px;
    flex-shrink: 0;
    transition: color 0.2s;
}

.flavor-toast-close:hover {
    color: #333;
}

.flavor-toast-success {
    border-left-color: #22c55e;
}

.flavor-toast-success .flavor-toast-icon {
    color: #22c55e;
}

.flavor-toast-error {
    border-left-color: #ef4444;
}

.flavor-toast-error .flavor-toast-icon {
    color: #ef4444;
}

.flavor-toast-warning {
    border-left-color: #f59e0b;
}

.flavor-toast-warning .flavor-toast-icon {
    color: #f59e0b;
}

.flavor-toast-info {
    border-left-color: #6366f1;
}

.flavor-toast-info .flavor-toast-icon {
    color: #6366f1;
}

@media (max-width: 480px) {
    #toast-container {
        right: 10px;
        left: 10px;
    }
    .flavor-toast {
        min-width: unset;
        max-width: unset;
    }
}
