:root {
    --ink: #1c2230;
    --muted: #5d6676;
    --faint: #8a93a3;
    --paper: #f4f5f7;
    --surface: #ffffff;
    --line: #e2e5ea;

    --blue: #1f4f8f;
    --blue-dark: #163b6c;
    --blue-soft: #e8eef7;

    --tag: #f4c542;
    --tag-dark: #d9a917;

    --green: #237a57;
    --green-soft: #e6f3ec;
    --red: #b93a32;
    --red-soft: #fbeceb;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;

    --shadow: 0 1px 2px rgba(28, 34, 48, 0.06), 0 4px 16px rgba(28, 34, 48, 0.06);
    --wrap: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--paper);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }

:focus-visible {
    outline: 3px solid rgba(31, 79, 143, 0.45);
    outline-offset: 2px;
}

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 20px;
}

.wrap-narrow { max-width: 760px; }
main { flex: 1; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-text span { color: var(--blue); }

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
}

.nav-link {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover { color: var(--ink); background: var(--paper); }
.nav-link.is-active { color: var(--blue); background: var(--blue-soft); }

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding-left: 14px;
    border-left: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}

.nav-user strong { color: var(--ink); font-weight: 700; }

.nav-logout {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
}

.nav-logout:hover { text-decoration: underline; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: #c9ced6; background: #fafbfc; }

.btn-wa { background: #1f8f55; color: #fff; }
.btn-wa:hover { background: #197547; }

.btn-warn { background: var(--tag); color: var(--ink); }
.btn-warn:hover { background: var(--tag-dark); }

.btn-danger { background: var(--surface); color: var(--red); border-color: #efc9c6; }
.btn-danger:hover { background: var(--red-soft); }

.btn-block { width: 100%; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 140px; }

.hero {
    background: var(--blue);
    color: #fff;
    padding: 48px 0 56px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 14px);
    pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    max-width: 16ch;
}

.hero p {
    margin-top: 12px;
    max-width: 52ch;
    color: #d3dff0;
    font-size: 1rem;
}

.search {
    position: relative;
    margin-top: 28px;
    max-width: 620px;
}

.search svg {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    color: var(--faint);
    pointer-events: none;
}

.search input {
    width: 100%;
    padding: 16px 52px 16px 48px;
    border: 0;
    border-radius: var(--radius);
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
    box-shadow: 0 10px 30px rgba(10, 25, 50, 0.25);
}

.search input:focus { outline: 3px solid var(--tag); outline-offset: 0; }

.spinner {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border: 3px solid var(--blue-soft);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner[hidden] { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 28px 0 20px;
}

.toolbar h2 { font-size: 1.15rem; font-weight: 800; }

.chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip {
    padding: 7px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
    padding-bottom: 56px;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover { border-color: #c9d3e2; box-shadow: var(--shadow); }

.card-media {
    position: relative;
    height: 190px;
    background: var(--paper);
}

.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .badge { position: absolute; top: 12px; left: 12px; }
.card.is-sold .card-media img { filter: grayscale(1); opacity: 0.6; }

.sold-label {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
}

.card-title { font-size: 1rem; font-weight: 700; }

.card-title a { color: var(--ink); text-decoration: none; }
.card-title a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.card:hover .card-title a { color: var(--blue); }

.card-desc {
    color: var(--muted);
    font-size: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    margin-top: auto;
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.price-old {
    color: var(--faint);
    font-size: 0.8rem;
    text-decoration: line-through;
}

.discount {
    color: var(--green);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 5px 12px 5px 22px;
    background: var(--tag);
    color: var(--ink);
    font-weight: 800;
    font-size: 1rem;
    white-space: nowrap;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}

.tag::before {
    content: "";
    position: absolute;
    left: 9px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--surface);
}

.tag-lg { font-size: 1.9rem; padding: 8px 20px 8px 34px; clip-path: polygon(16px 0, 100% 0, 100% 100%, 16px 100%, 0 50%); }
.tag-lg::before { left: 14px; width: 9px; height: 9px; margin-top: -4.5px; }

.card.is-sold .tag { background: #e4e6ea; color: var(--muted); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
}

.badge-buku       { background: #dcf2e3; color: #1d5e3a; }
.badge-elektronik { background: #dde8f8; color: #1f4581; }
.badge-alatkos    { background: #fbf0c9; color: #7a5710; }
.badge-pakaian    { background: #f8e1ec; color: #8c2553; }
.badge-furniture  { background: #ebe4f7; color: #53308f; }
.badge-default    { background: #e7e9ed; color: #3d4452; }

.empty {
    grid-column: 1 / -1;
    padding: 56px 20px;
    text-align: center;
    border: 1px dashed #cfd4dc;
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.empty h3 { font-size: 1.05rem; }
.empty p { color: var(--muted); margin-top: 6px; }
.empty .btn { margin-top: 18px; }

.crumbs { padding: 24px 0 16px; font-size: 0.85rem; color: var(--faint); }

.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.crumbs li + li::before { content: "/"; margin-right: 6px; color: #c3c8d0; }

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue); }

.crumbs [aria-current] {
    color: var(--ink);
    font-weight: 600;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-error { background: var(--red-soft); border-color: #efc9c6; color: var(--red); }
.alert-success { background: var(--green-soft); border-color: #bfe0cd; color: var(--green); }
.alert-info { background: var(--blue-soft); border-color: #c5d5ea; color: var(--blue); }

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.panel + .panel { margin-top: 16px; }
.panel-title { font-size: 1rem; font-weight: 800; }
.panel-note { margin-top: 4px; color: var(--muted); font-size: 0.85rem; }

.detail {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 56px;
}

.detail-media {
    position: sticky;
    top: 88px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
}

.detail-media img { width: 100%; height: 440px; object-fit: cover; }
.detail-media.is-sold img { filter: grayscale(1); opacity: 0.65; }
.detail-media .sold-label { font-size: 0.9rem; padding: 6px 14px; top: 16px; right: 16px; }

.detail h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-top: 12px; }

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-top: 10px;
    font-size: 0.88rem;
    color: var(--muted);
}

.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-ok { color: var(--green); }
.status-sold { color: var(--red); }

.price-box { margin: 22px 0; }
.price-box .price-old { font-size: 0.9rem; margin-top: 10px; }
.price-box .discount { display: block; margin-top: 2px; font-size: 0.9rem; }

.desc { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.desc h2 { font-size: 0.95rem; font-weight: 800; margin-bottom: 8px; }
.desc p { color: #3a4251; white-space: pre-line; }

.owner-form { margin-top: 16px; display: grid; gap: 10px; }
.owner-edit { margin-top: 10px; }

.back-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover { color: var(--blue); }

.page-head { padding: 32px 0 24px; }
.crumbs + .page-head { padding-top: 0; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.page-head p { margin-top: 6px; color: var(--muted); }

fieldset.panel { margin: 0 0 16px; min-width: 0; }

legend.panel-title {
    float: left;
    width: 100%;
    padding: 0;
    margin-bottom: 18px;
}

legend.panel-title + * { clear: both; }

.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field-row .field { margin-bottom: 0; }
.field-row > .field:only-child { grid-column: 1 / -1; }

label,
.label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 700;
}

.req { color: var(--red); }
.hint { margin-top: 6px; font-size: 0.8rem; color: var(--faint); }

.input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #d3d8e0;
    border-radius: 0.85rem;
    background: var(--surface);
    font: inherit;
    font-size: 1rem;
    color: var(--ink);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:hover { border-color: #b9c0cb; }

.input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(31, 79, 143, 0.18);
}

textarea.input { resize: vertical; min-height: 110px; }

select.input {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235d6676' stroke-width='1.8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.input-pin { text-align: center; font-size: 1.2rem; font-weight: 800; letter-spacing: 0.4em; }

.input-money { position: relative; }
.input-money span {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faint);
    font-weight: 700;
    font-size: 0.9rem;
    pointer-events: none;
}
.input-money .input { padding-left: 42px; }

.photo { display: flex; gap: 20px; align-items: flex-start; }

.photo-preview {
    width: 160px;
    height: 120px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px dashed #c3cad5;
    background: var(--paper);
}

.photo-input { flex: 1; min-width: 0; }

input[type="file"].input { padding: 8px; font-size: 0.85rem; }

.discount-info {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--green-soft);
    color: var(--green);
    font-size: 0.88rem;
    font-weight: 700;
}

.discount-info[hidden] { display: none; }

.form-actions { display: flex; gap: 12px; margin: 8px 0 56px; }
.form-actions .btn { flex: 1; }

.pin-card .panel-title { font-size: 1.3rem; }
.pin-card { max-width: 420px; margin: 24px auto 56px; text-align: center; }
.pin-card .panel-note { margin-bottom: 20px; }
.pin-card form { display: grid; gap: 12px; }
.pin-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--blue);
}
.pin-icon svg { width: 24px; height: 24px; }

.auth-single-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f9 0%, #e2eaf5 100%);
    padding: 24px;
}

.auth-container-center {
    width: 100%;
    max-width: 440px;
    display: flex;
    justify-content: center;
}

.auth-form-card {
    background: #ffffff;
    width: 100%;
    padding: 36px 32px;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px -15px rgba(31, 79, 143, 0.12);
    border: 1px solid rgba(226, 229, 234, 0.8);
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 24px;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .input {
    padding-right: 48px;
}

.password-toggle-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.15s;
}

.password-toggle-btn:hover {
    color: var(--ink);
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 20px 0;
    font-size: 0.8rem;
    color: var(--faint);
    background: var(--surface);
}

.card-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    flex-wrap: wrap;
}

.btn-card {
    flex: 1;
    min-width: 0;
    padding: 7px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-family: inherit;
    line-height: 1.2;
}

.btn-card-edit {
    background: #eff6ff;
    color: #1e40af;
    border-color: #dbeafe;
}
.btn-card-edit:hover {
    background: #dbeafe;
    border-color: #93c5fd;
    transform: translateY(-1px);
}

.btn-card-sold {
    background: #f0fdf4;
    color: #15803d;
    border-color: #dcfce7;
}
.btn-card-sold:hover {
    background: #dcfce7;
    border-color: #86efac;
    transform: translateY(-1px);
}
.btn-card-sold.is-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-card-hapus {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fee2e2;
}
.btn-card-hapus:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    transform: translateY(-1px);
}

.btn-card-wa {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 3px 8px rgba(34, 197, 94, 0.3);
    padding: 9px 12px;
    font-size: 0.8rem;
}
.btn-card-wa:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(34, 197, 94, 0.4);
}

.btn-card-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    flex: 1;
    padding: 9px 12px;
    font-size: 0.8rem;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.modal-overlay[hidden] { display: none; }
.modal-overlay.is-open { opacity: 1; }

.modal-box {
    background: #fff;
    border-radius: 20px;
    max-width: 420px;
    width: 100%;
    padding: 28px 24px 22px;
    text-align: center;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.is-open .modal-box {
    transform: scale(1) translateY(0);
}

.modal-icon {
    font-size: 2.6rem;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.35);
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 8px;
}

.modal-message {
    font-size: 0.92rem;
    color: #6b7280;
    line-height: 1.55;
    margin-bottom: 22px;
}
.modal-message strong {
    color: #1f2937;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.modal-btn-cancel {
    background: #f3f4f6;
    color: #4b5563;
    border-color: #e5e7eb;
}
.modal-btn-cancel:hover {
    background: #e5e7eb;
    color: #1f2937;
    transform: translateY(-1px);
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.35);
}
.modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.45);
}

.modal-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 6px 15px rgba(239, 68, 68, 0.35);
}
.modal-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.45);
}

.modal-btn-success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.35);
}
.modal-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.45);
}

/* Dark mode modal */
body.dark-mode .modal-box { background: #1e293b; }
body.dark-mode .modal-title { color: #f1f5f9; }
body.dark-mode .modal-message { color: #94a3b8; }
body.dark-mode .modal-message strong { color: #f1f5f9; }
body.dark-mode .modal-btn-cancel {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}
body.dark-mode .modal-btn-cancel:hover { background: #475569; }

/* ---------- Responsif ---------- */
@media (max-width: 900px) {
    .detail { grid-template-columns: 1fr; }
    .detail-media { position: relative; top: 0; }
}

@media (max-width: 640px) {
    .site-header .wrap { padding-top: 10px; padding-bottom: 10px; }
    .nav { width: 100%; overflow-x: auto; }
    .site-header .wrap { position: relative; }
    .nav-user { position: absolute; top: 18px; right: 20px; margin: 0; padding: 0; border: 0; }
    .nav-user .nav-name { display: none; }
    .hero { padding: 36px 0 40px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .card-body { padding: 12px; }
    .card-desc { display: none; }
    .card-foot { flex-direction: column; align-items: flex-start; }
    .tag { font-size: 0.9rem; }
    .field-row { grid-template-columns: 1fr; }
    .photo { flex-direction: column; }
    .photo-preview { width: 100%; max-width: 240px; height: 180px; }
    .card-media { height: 140px; }
    .detail-media img { height: 280px; }
    .form-actions { flex-direction: column-reverse; }
    .panel { padding: 18px; }
    .card-actions { gap: 4px; }
    .btn-card { font-size: 0.7rem; padding: 6px 4px; }
    .btn-card-wa, .btn-card-disabled { padding: 8px 6px; font-size: 0.75rem; }
    .modal-box { padding: 22px 18px 18px; }
    .modal-icon { width: 60px; height: 60px; font-size: 2.2rem; }
    .modal-actions { flex-direction: column-reverse; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after { transition: none !important; animation-duration: 0.01ms !important; 
    }
}
/* ---------- Umpan balik harga langsung di halaman ---------- */
.price-feedback { margin-top: 6px; min-height: 1px; }
.price-read { margin: 0; font-size: 0.8rem; color: var(--muted); font-style: italic; }
.price-read:empty { display: none; }
.price-alert {
    margin: 6px 0 0;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}
.price-alert[hidden] { display: none; }
.price-alert.is-error { background: var(--red-soft); border-color: #efc9c6; color: var(--red); }
.price-alert.is-warn { background: #fff7e0; border-color: #f1dc9a; color: #8a6400; }
.price-fix {
    margin-left: 4px;
    padding: 3px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: #ffffff;
    color: inherit;
    font: inherit;
    font-size: 0.8rem;
    cursor: pointer;
}
.price-fix:hover { background: var(--blue-soft); }
input.is-invalid { border-color: var(--red) !important; box-shadow: 0 0 0 3px rgba(185, 58, 50, 0.15) !important; }