:root {
    --bg: #0f172a;
    --card: #0b1224;
    --accent: #fbbf24;
    --muted: #9ca3af;
    --text: #e5e7eb;
    --danger: #ef4444;
    --success: #22c55e;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    width: min(1200px, 90%);
    margin: 0 auto 64px;
}

.hero {
    background: radial-gradient(circle at 20% 20%, #1e293b, #0b1224 55%);
    padding: 80px 24px;
    text-align: center;
}
.hero__content { width: min(800px, 100%); margin: 0 auto; }
.tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 12px;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); margin: 0 0 12px; }
.subtitle { color: var(--muted); margin: 0 0 24px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
    background: var(--accent);
    color: #111827;
    border: none;
    padding: 12px 18px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 30px rgba(251, 191, 36, 0.3); }
.btn--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn--danger { background: var(--danger); color: #fff; }
.btn--small { padding: 8px 12px; font-size: 14px; }

.section { margin-top: 48px; }
.section__heading h2 { margin: 0 0 8px; font-size: 28px; }
.section__heading p { margin: 0; color: var(--muted); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.card__image {
    height: 180px;
    background-size: cover;
    background-position: center;
}
.card__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.card h3 { margin: 0; font-size: 20px; }
.price { font-weight: 800; color: var(--accent); margin: 0; }
.stock { margin: 0; color: var(--muted); }
.stock--ready { color: var(--success); }
.stock--empty { color: var(--danger); }
.desc { color: var(--muted); margin: 6px 0 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.footer {
    background: #0b1224;
    padding: 40px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.footer__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: min(1200px, 90%);
    margin: 0 auto 20px;
}
.links { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.map-container iframe {
    width: 100%;
    height: 220px;
    border: none;
    border-radius: 12px;
}

.auth, .dashboard { background: var(--bg); min-height: 100vh; }
.auth__box {
    width: min(420px, 90%);
    margin: 60px auto;
    background: var(--card);
    padding: 28px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.auth__box h1 { margin-top: 0; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-weight: 600; }
.form input, .form textarea, .form select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #0f172a;
    color: var(--text);
}
.form input:focus, .form textarea:focus { outline: 1px solid var(--accent); }
.alert { padding: 12px; border-radius: 10px; margin: 0 0 12px; }
.alert--error { background: rgba(239, 68, 68, 0.1); color: #fecdd3; border: 1px solid rgba(239, 68, 68, 0.3); }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: #0b1224;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.topbar h1 { margin: 0 0 6px; }

.form--inline .form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.card.form { padding: 16px; }

.table {
    width: 100%;
    display: block;
    /* header + body layout */
}
.table__body {
    display: grid;
    gap: 8px;
}
.table__head, .table__row {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr 0.6fr 1.2fr 1fr;
    align-items: center;
    gap: 10px;
}
.table__head { color: var(--muted); font-weight: 700; }
.table__row {
    background: var(--card);
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
/* Drag visuals */
.draggable-row { transition: box-shadow 0.12s ease, transform 0.12s ease, opacity 0.12s ease; }
.draggable-row:hover { box-shadow: 0 6px 20px rgba(2,6,23,0.5); }
.draggable-row.dragging { opacity: 0.85; transform: translateY(-6px) scale(1.005); box-shadow: 0 18px 50px rgba(2,6,23,0.6); z-index: 40; }
.drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; margin-right: 8px; background: rgba(255,255,255,0.03); border-radius: 8px; cursor: grab; user-select: none; font-weight: 700; }
.drag-handle:active { cursor: grabbing; }
.name-with-handle { display: flex; align-items: center; gap: 8px; }
.table__row input { width: 100%; }
.table__row textarea { width: 100%; resize: vertical; min-height: 60px; }
.table__image { display: grid; gap: 6px; align-items: center; }
.table__image img { width: 100%; max-width: 120px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.05); }
.table__actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Lightbox gambar */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
}
.lightbox-backdrop img {
    max-width: 95vw;
    max-height: 90vh;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

/* Modal crop gambar */
.cropper-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 70;
}
.cropper-modal__inner {
    width: min(900px, 95vw);
    background: #020617;
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}
.cropper-modal__canvas {
    width: 100%;
    max-height: 60vh;
    overflow: hidden;
}
.cropper-modal__canvas img {
    max-width: 100%;
}
.cropper-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 900px) {
    .table__head, .table__row {
        grid-template-columns: 1fr;
    }
}

/* Responsif tambahan */
@media (max-width: 720px) {
    .hero { padding: 56px 20px; }
    .cta { flex-direction: column; align-items: stretch; }
    .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .container { width: 92%; }
    .form--inline .form__row { grid-template-columns: 1fr; }
    .table__row { gap: 12px; }
    .card__image { height: 160px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 30px; }
    .section__heading h2 { font-size: 24px; }
    .btn { width: 100%; text-align: center; }
    .footer { padding: 32px 18px; }
    .map-container iframe { height: 180px; }
}

