/* ═══════════════════════════════════════════════════════
   STYLE.CSS — Wijaya Catering Management System
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --green-50:  #f0fdf6;
  --green-100: #dcfce8;
  --green-200: #bbf7d2;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --gray-50:   #f9fafb;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-300:  #d1d5db;
  --gray-400:  #9ca3af;
  --gray-500:  #6b7280;
  --gray-600:  #4b5563;
  --gray-700:  #374151;
  --gray-800:  #1f2937;
  --gray-900:  #111827;
  --sidebar-w: 240px;
  --radius:    10px;
  --shadow:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--gray-50); color: var(--gray-800); font-size: 14px; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }

/* ── Layout ── */
.wc-layout { display: flex; min-height: 100vh; }
.wc-main   { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.wc-body   { padding: 24px; flex: 1; }

/* ── Cards ── */
.card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 20px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--gray-800); margin-bottom: 16px; }

/* ── Stat cards ── */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { font-size: 12px; color: var(--gray-500); font-weight: 500; margin-bottom: 6px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--gray-900); line-height: 1.1; }
.stat-sub   { font-size: 11px; margin-top: 4px; color: var(--gray-400); }
.stat-sub.up   { color: var(--green-600); }
.stat-sub.down { color: #ef4444; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; border: none; transition: .2s; cursor: pointer; }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-green   { background: var(--green-700); color: #fff; }
.btn-green:hover { background: var(--green-800); }
.btn-outline { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn-danger  { background: #fef2f2; color: #ef4444; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }

/* ── Form elements ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.form-hint  { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.form-input { width: 100%; padding: 10px 14px; border: 1px solid var(--gray-200); border-radius: 8px; font-size: 14px; background: #fff; color: var(--gray-800); transition: .2s; outline: none; }
.form-input:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(34,197,94,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
select.form-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.input-prefix-wrap { position: relative; }
.input-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--gray-400); font-weight: 500; pointer-events: none; }
.input-prefix + .form-input { padding-left: 36px; }

/* ── Upload area ── */
.upload-area { border: 2px dashed var(--gray-200); border-radius: 8px; padding: 20px; text-align: center; cursor: pointer; transition: .2s; background: var(--gray-50); }
.upload-area:hover { border-color: var(--green-400); background: var(--green-50); }
.upload-area svg { width: 28px; height: 28px; color: var(--gray-300); margin: 0 auto 8px; display: block; }
.upload-area p  { font-size: 13px; color: var(--gray-500); }
.upload-area span { font-size: 11px; color: var(--gray-400); }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { font-size: 11px; font-weight: 600; color: var(--gray-500); text-align: left; padding: 10px 14px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); font-size: 13px; color: var(--gray-700); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--gray-50); }
.td-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: .2s; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: #fff; border-radius: 14px; padding: 28px; width: 500px; max-width: 95vw; max-height: 90vh; overflow-y: auto; transform: translateY(12px); transition: .2s; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-title  { font-size: 16px; font-weight: 600; color: var(--gray-900); }
.modal-close  { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--gray-200); background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--gray-500); font-size: 16px; line-height: 1; }
.modal-close:hover { background: var(--gray-100); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ── Tabs ── */
.tabs { display: flex; gap: 2px; background: var(--gray-100); padding: 4px; border-radius: 9px; width: fit-content; }
.tab  { padding: 7px 18px; border-radius: 7px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--gray-500); transition: .15s; border: none; background: transparent; }
.tab.active { background: #fff; color: var(--gray-800); box-shadow: var(--shadow); }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.alert svg { width: 16px; height: 16px; flex-shrink: 0; }
.alert-success { background: var(--green-50);  color: #166534; border: 1px solid var(--green-200); }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ── Section header ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.section-title  { font-size: 15px; font-weight: 600; color: var(--gray-800); }
.section-sub    { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

/* ── Grid layouts ── */
.two-col   { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* ── Progress bar ── */
.progress-bar  { height: 6px; background: var(--gray-100); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green-500); border-radius: 99px; transition: .3s; }

/* ── Divider ── */
.divider { height: 1px; background: var(--gray-100); margin: 20px 0; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state svg { width: 48px; height: 48px; color: var(--gray-300); margin: 0 auto 14px; display: block; }
.empty-state h3 { font-size: 15px; font-weight: 600; color: var(--gray-500); margin-bottom: 6px; }
.empty-state p  { font-size: 13px; color: var(--gray-400); }

/* ── Chart bars ── */
.chart-bars { display: flex; gap: 6px; align-items: flex-end; height: 100px; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.chart-bar     { width: 100%; border-radius: 4px 4px 0 0; transition: .3s; min-height: 4px; }
.chart-bar-lbl { font-size: 10px; color: var(--gray-400); white-space: nowrap; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .wc-main  { margin-left: 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col, .three-col, .form-row { grid-template-columns: 1fr; }
  #wc-sidebar { transform: translateX(-100%); transition: .3s; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .wc-body   { padding: 16px; }
}

/* ── Animations ── */
.fade-in { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
