/* ==============================================================
   CUSTOM STYLESHEET: SISTEM MANAJEMEN MENU & HPP KULINER
   ============================================================== */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #475569;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --bg-light: #f8fafc;
    --sidebar-bg: #0f172a;
    --sidebar-hover: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #38bdf8;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Wrapper */
.app-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styling */
.app-sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    z-index: 1030;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-brand:hover {
    color: #ffffff;
}

.sidebar-menu {
    padding: 1rem 0.75rem;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 0.75rem 0.75rem 0.35rem;
    font-weight: 600;
}

.nav-item-custom {
    margin-bottom: 0.25rem;
}

.nav-link-custom {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link-custom i {
    font-size: 1.15rem;
    width: 1.5rem;
    text-align: center;
}

.nav-link-custom:hover {
    color: #ffffff;
    background-color: var(--sidebar-hover);
}

.nav-link-custom.active {
    color: #ffffff;
    background-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

/* Main Content Area */
.app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar */
.app-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.main-body {
    padding: 1.75rem;
    flex-grow: 1;
}

/* Card Enhancements */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: var(--card-shadow);
    background-color: #ffffff;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* Metric / Stat Cards */
.stat-card {
    border-radius: 0.75rem;
    padding: 1.25rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.825rem;
    color: #64748b;
    font-weight: 500;
}

/* Custom Table Styling */
.table-custom {
    margin-bottom: 0;
}

.table-custom th {
    background-color: #f8fafc;
    color: #475569;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.table-custom td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    font-size: 0.88rem;
    border-bottom: 1px solid #f1f5f9;
}

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

/* Badges */
.badge-pill {
    padding: 0.35em 0.75em;
    border-radius: 50rem;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Food Cost Indicator Badges */
.badge-food-cost-safe {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-food-cost-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-food-cost-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

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

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

/* Responsive Sidebar Toggle */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -260px;
    }
    
    .app-sidebar.show {
        left: 0;
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.6);
        z-index: 1025;
        display: none;
    }
    
    .sidebar-backdrop.show {
        display: block;
    }
}

/* Print Styling */
@media print {
    .app-sidebar,
    .app-navbar,
    .btn,
    .no-print,
    .pagination {
        display: none !important;
    }
    
    body, .app-wrapper, .app-main, .main-body {
        background-color: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .table-custom th, .table-custom td {
        border-color: #000000 !important;
        color: #000000 !important;
    }
}
