/* =====================================================
   DAPURKITA - GLOBAL STYLESHEET
   Dark premium food app design system
   ===================================================== */

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

/* ===================== CSS VARIABLES ===================== */
:root {
    /* Colors - Maxim Light Theme */
    --bg-primary:   #F5F6F8;
    --bg-secondary: #FFFFFF;
    --bg-card:      #FFFFFF;
    --bg-card-hover:#FAFAFA;
    --bg-glass:     #FFFFFF; /* No more glass */
    --border-glass: #E5E7EB;
    --border-light: #F3F4F6;

    --accent-orange: #FFD400; /* Maxim Yellow */
    --accent-gold:   #FFD400;
    --accent-teal:   #111111; /* Maxim Black */
    --accent-green:  #22C55E;
    --accent-red:    #EF4444;
    --accent-blue:   #3B82F6;
    --accent-purple: #8B5CF6;

    /* Gradients (Replaced by flat solid colors for Maxim) */
    --grad-orange: #FFD400;
    --grad-teal:   #111111;
    --grad-green:  #22C55E;
    --grad-purple: #8B5CF6;
    --grad-red:    #EF4444;

    /* Text */
    --text-primary:   #1F2937;
    --text-secondary: #4B5563;
    --text-muted:     #9CA3AF;
    --text-accent:    #D97706; /* Darker yellow/orange for text readability */

    /* Spacing */
    --radius-sm:   6px;
    --radius-md:   10px;
    --radius-lg:   14px;
    --radius-xl:   16px;
    --radius-full: 9999px;

    /* Shadow */
    --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg:  0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-orange: 0 4px 15px rgba(255, 212, 0, 0.3);
    --shadow-teal:   0 4px 15px rgba(17, 17, 17, 0.2);

    /* Transitions */
    --transition: 0.2s ease-in-out;
}

/* ===================== RESET & BASE ===================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Menghapus pseudo element dekoratif gradasi blur */

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===================== TYPOGRAPHY ===================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

/* ===================== SCROLLBAR ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ===================== GLASS CARD ===================== */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: #D1D5DB;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm); /* Maxim uses slightly rounded rectangular buttons */
    font-size: 0.95rem;
    font-weight: 700; /* Bold text for buttons */
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-orange);
    color: #000000; /* Black text on yellow background */
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    filter: brightness(0.95);
    box-shadow: 0 4px 12px rgba(255, 212, 0, 0.4);
}

.btn-secondary {
    background: #F3F4F6;
    color: var(--text-primary);
    border: 1px solid #E5E7EB;
}
.btn-secondary:hover {
    background: #E5E7EB;
    border-color: #D1D5DB;
}

.btn-teal {
    background: var(--accent-teal); /* Dark black for Maxim */
    color: #FFFFFF;
}
.btn-teal:hover { filter: brightness(1.2); }

.btn-danger {
    background: var(--accent-red);
    color: white;
}
.btn-danger:hover { filter: brightness(0.9); }

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent; /* No border for ghost in light mode */
}
.btn-ghost:hover { 
    color: var(--text-primary); 
    background: #F3F4F6;
    border-radius: var(--radius-sm);
}

.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===================== FORM ELEMENTS ===================== */
.form-group { margin-bottom: 1.2rem; }
.form-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-orange);
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.2);
}

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

select.form-control { cursor: pointer; }
select.form-control option { background: #FFFFFF; color: #111111; }

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

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}
.input-group .form-control { padding-left: 2.8rem; }
.input-group .input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}
.input-group .input-icon-right {
    position: absolute;
    right: 1rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* ===================== BADGE ===================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-orange  { background: #FEF3C7;  color: #D97706; }
.badge-teal    { background: #F3F4F6;  color: #111111; } /* Black for Maxim */
.badge-green   { background: #DCFCE7;  color: #16A34A; }
.badge-red     { background: #FEE2E2; color: #DC2626; }
.badge-blue    { background: #DBEAFE;  color: #2563EB; }
.badge-yellow  { background: #FEF9C3;  color: #CA8A04; }
.badge-purple  { background: #F3E8FF;  color: #9333EA; }

/* ===================== ALERT / TOAST ===================== */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.alert-success { background: #DCFCE7; border: 1px solid #BBF7D0; color: #16A34A; }
.alert-error   { background: #FEE2E2; border: 1px solid #FECACA; color: #DC2626; }
.alert-warning { background: #FEF3C7; border: 1px solid #FDE68A; color: #D97706; }
.alert-info    { background: #DBEAFE; border: 1px solid #BFDBFE; color: #2563EB; }

/* Toast Notification */
#toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-sm);
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: auto;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
}
.toast.toast-success { border-left: 4px solid #16A34A; }
.toast.toast-error   { border-left: 4px solid #DC2626; }
.toast.toast-info    { border-left: 4px solid #2563EB; }
.toast-icon { font-size: 1.2rem; }
.toast-hide { animation: slideOutRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }

/* ===================== TABLE ===================== */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid #E5E7EB;
}
table { width: 100%; border-collapse: collapse; }
thead th {
    background: #F9FAFB;
    padding: 0.9rem 1rem;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
tbody td {
    padding: 0.9rem 1rem;
    border-top: 1px solid #F3F4F6;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: #FFFFFF;
}
tbody tr:hover td { background: #F9FAFB; }

/* ===================== MODAL ===================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5); /* Flat overlay */
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: var(--radius-md);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.2s ease-out;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.modal-title { font-size: 1.1rem; font-weight: 700; color: #111111; }
.modal-close {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #F3F4F6;
    border: none; color: var(--text-secondary);
    cursor: pointer; font-size: 1rem; transition: var(--transition);
}
.modal-close:hover { background: #FEE2E2; color: #DC2626; }

/* ===================== NAV BREADCRUMB ===================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.breadcrumb a { color: var(--accent-orange); font-weight: 600; }
.breadcrumb span { color: var(--text-muted); }

/* ===================== LOADING SKELETON ===================== */
.skeleton {
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: #FFFFFF;
    border: 1px dashed #D1D5DB;
    border-radius: var(--radius-md);
}
.empty-state .icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state h3 { color: var(--text-primary); margin-bottom: 0.5rem; }

/* ===================== STATUS CHIP ===================== */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
}
.status-pending    { background: #FEF3C7;  color: #D97706; }
.status-confirmed  { background: #F3F4F6;  color: #111111; }
.status-preparing  { background: #DBEAFE;  color: #2563EB; }
.status-delivering { background: #DCFCE7; color: #16A34A; }
.status-delivered  { background: #BBF7D0;   color: #15803D; }
.status-cancelled  { background: #FEE2E2; color: #DC2626; }

/* ===================== TOGGLE SWITCH ===================== */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #D1D5DB;
    border-radius: 12px;
    transition: var(--transition);
}
.toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--accent-green); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }

/* ===================== STAR RATING ===================== */
.rating {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: #F59E0B;
    font-size: 0.85rem;
}

/* ===================== FOOD CARD PLACEHOLDER ===================== */
.food-img-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: #F3F4F6 !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

/* ===================== QUANTITY CONTROL ===================== */
.qty-control {
    display: inline-flex;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.qty-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F9FAFB;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}
.qty-btn:hover { background: #E5E7EB; }
.qty-display {
    min-width: 36px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #111111;
}

/* ===================== SECTION HEADER ===================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.section-title {
    font-size: 1.2rem;
    font-weight: 800; /* Bolder title */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #111111;
}
.section-line {
    height: 3px;
    width: 40px;
    background: var(--accent-orange); /* Solid yellow */
    border-radius: 2px;
    margin-top: 0.4rem;
    margin-bottom: 1.5rem;
}

/* ===================== PROGRESS / STEPPER ===================== */
.stepper {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}
.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 1;
    background: #FFFFFF;
    border: 2px solid #D1D5DB;
    color: var(--text-muted);
    transition: var(--transition);
    font-weight: 700;
}
.step.done .step-dot  { background: var(--accent-green); border-color: var(--accent-green); color: white; }
.step.active .step-dot { background: var(--accent-orange); border-color: var(--accent-orange); color: #111111; }
.step-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
    font-weight: 600;
}
.step.done .step-label  { color: var(--accent-green); }
.step.active .step-label { color: #111111; }
.step-line {
    position: absolute;
    top: 18px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #D1D5DB;
}
.step.done .step-line  { background: var(--accent-green); }

/* ===================== GRID LAYOUTS ===================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

@media (max-width: 768px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== UTILITIES ===================== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-orange { color: var(--text-accent); }
.text-teal   { color: var(--accent-teal); }
.text-green  { color: var(--accent-green); }
.text-red    { color: var(--accent-red); }
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm     { font-size: 0.85rem; }
.text-xs     { font-size: 0.75rem; }
.font-bold   { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-semibold { font-weight: 600; }
.d-flex      { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1       { gap: 0.5rem; }
.gap-2       { gap: 1rem; }
.gap-3       { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.p-1  { padding: 0.5rem; }
.p-2  { padding: 1rem; }
.p-3  { padding: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(100%); }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.animate-fadeIn { animation: fadeIn 0.3s ease; }
.animate-pulse  { animation: pulse 2s infinite; }
.animate-spin   { animation: spin 1s linear infinite; }
.animate-bounce { animation: bounce 1s ease infinite; }

/* ===================== RESPONSIVE CONTAINER ===================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.container-sm {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===================== PAGE WRAPPER ===================== */
.page-wrapper {
    min-height: 100vh;
    position: relative;
    z-index: 1;
}
