/* =====================================================
   GLOBAL VARIABLES (THEME UTAMA)
===================================================== */
:root {
    --bg-main: #0b1220;
    --bg-card: #111a2e;
    --bg-card-soft: #16213b;

    --text-main: #e5e7eb;
    --text-muted: #9ca3af;

    --input: #0f172a;
    --placeholder: #6b7280;
    --border: #1e293b;

    --accent: #22c55e;
    --focus: #38bdf8;

    /* Status / Badge */
    --status-new: #22c55e;
    --status-process: #facc15;
    --status-done: #22c55e;
    --status-cancel: #f87171;

    --active: #22c55e;
    --inactive: #94a3b8;
    --soldout: #f87171;
}

/* =====================================================
   RESET & BASE
===================================================== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.4;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
    border-radius: 8px;
}

input::placeholder,
textarea::placeholder {
    color: var(--placeholder);
}

/* =====================================================
   APP CONTAINER
===================================================== */
.app {
    max-width: 420px;
    margin: 0 auto;
    padding: 16px;
    padding-bottom: 80px;
    /* space for bottom nav */
}

/* =====================================================
   TOPBAR / HEADER
===================================================== */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.topbar h1 {
    font-size: 18px;
    margin: 0;
}

.topbar p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.logout-btn,
.back-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--bg-card-soft);
    padding: 6px 10px;
    border-radius: 10px;
}

.logout-btn:hover,
.back-btn:hover {
    background: var(--bg-card-soft);
    color: var(--text-main);
}

/* =====================================================
   CARD GENERIC
===================================================== */
.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px;
}

.card h2 {
    font-size: 14px;
    margin: 0 0 12px;
}

/* =====================================================
   SUMMARY (Dashboard)
===================================================== */
.summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.summary-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.summary-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
}

.summary-item {
    background: var(--bg-card-soft);
    border-radius: 14px;
    padding: 12px;
    text-align: center;
}

.summary-card strong,
.summary-item strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.summary-card span,
.summary-item span {
    font-size: 11px;
    color: var(--text-muted);
}

/* =====================================================
   STATUS RINGKAS
===================================================== */
.status-list {
    display: flex;
    gap: 8px;
    text-align: center;
}

.status-item {
    flex: 1;
    background: var(--bg-card-soft);
    border-radius: 12px;
    padding: 10px;
    font-size: 12px;
}

.status-item strong {
    display: block;
    font-size: 14px;
}

.done {
    color: var(--status-done);
}

.process {
    color: var(--status-process);
}

.cancel {
    color: var(--status-cancel);
}

/* =====================================================
   FILTER
===================================================== */
.filter {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter button {
    flex: 1;
    background: var(--bg-card-soft);
    border: none;
    padding: 8px;
    border-radius: 10px;
    color: var(--text-main);
    font-size: 12px;
}

.filter button:hover {
    background: #1f2a4a;
}

/* =====================================================
   ORDER LIST
===================================================== */
.orders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-name {
    font-weight: 600;
}

.order-info {
    font-size: 13px;
    color: var(--text-muted);
}

.order-actions {
    display: flex;
    gap: 8px;
}

.order-actions button {
    flex: 1;
    background: var(--bg-card-soft);
    border: none;
    color: var(--text-main);
    padding: 8px;
    border-radius: 10px;
    font-size: 13px;
}

.order-actions button:hover {
    background: #1f2a4a;
}

/* =====================================================
   ADD MENU FORM
===================================================== */
.add-menu {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 20px;
}

.add-menu h2 {
    font-size: 14px;
    margin: 0 0 10px;
}

.field-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin: 6px 0 4px;
}

.add-menu input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 13px;
}

.image-preview {
    margin: 8px 0 13px;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 12px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-text {
    font-size: 12px;
    color: var(--text-muted);
}

.add-menu button {
    width: 100%;
    background: var(--accent);
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    color: #052e16;
}

/* =====================================================
   MENU LIST
===================================================== */
.menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.menu-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--bg-main);
}

.menu-name {
    font-weight: 600;
}

.menu-price {
    font-size: 13px;
    color: var(--text-muted);
}

.menu-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.menu-actions button {
    flex: 1;
    background: var(--bg-card-soft);
    border: none;
    color: var(--text-main);
    padding: 8px;
    border-radius: 10px;
    font-size: 13px;
}

.menu-actions button:hover {
    background: #1f2a4a;
}

/* =====================================================
   BADGES
===================================================== */
.badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    font-weight: 500;
}

.badge.new {
    background: rgba(34, 197, 94, 0.15);
    color: var(--status-new);
}

.badge.process {
    background: rgba(250, 204, 21, 0.15);
    color: var(--status-process);
}

.badge.done {
    background: rgba(148, 163, 184, 0.15);
    color: var(--status-done);
}

.badge.active {
    background: rgba(34, 197, 94, 0.15);
    color: var(--active);
}

.badge.inactive {
    background: rgba(148, 163, 184, 0.15);
    color: var(--inactive);
}

.badge.soldout {
    background: rgba(248, 113, 113, 0.15);
    color: var(--soldout);
}

/* =====================================================
   REPORT / REKAP
===================================================== */
.report-list,
.rekap-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.report-item,
.rekap-item,
.rekap-total {
    background: var(--bg-card-soft);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.rekap-total {
    font-weight: 600;
}

/* =====================================================
   BOTTOM NAVIGATION
===================================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-main);
    border-top: 1px solid var(--bg-card-soft);
}

.bottom-nav-inner {
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    padding: 8px 12px;
}

.bottom-nav a {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 6px 0;
}

.bottom-nav a.active {
    color: var(--accent);
    font-weight: 600;
}

.bottom-nav a:hover {
    color: var(--text-main);
}


/* Profile */
.profile {
    display: flex;
    gap: 12px;
    align-items: center;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.profile-info {
    font-size: 13px;
}

.profile-info strong {
    display: block;
    font-size: 14px;
}

.profile-info span {
    color: var(--text-muted);
    font-size: 12px;
}

/* Form Pengaturan Dasar */
.form-group {
    margin-bottom: 10px;
}

.akun-card label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--text-muted);
}

.akun-card input {
    width: 100%;
    padding: 10px;
    background: var(--input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
}

.akun-card .btn-primary {
    width: 100%;
    background: var(--accent);
    border: none;
    padding: 10px;
    border-radius: 10px;
    font-weight: 600;
    color: #052e16;
    margin-top: 8px;
}

.akun-card .btn-secondary {
    width: 100%;
    background: var(--bg-card-soft);
    border: none;
    padding: 10px;
    border-radius: 10px;
    color: var(--text-main);
    margin-top: 6px;
}

.akun-card .btn-danger {
    width: 100%;
    background: transparent;
    border: 1px solid #1f2a4a;
    padding: 10px;
    border-radius: 10px;
    color: #f87171;
}