@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:      #0f1e3c;
    --navy-mid:  #1a3060;
    --gold:      #c9a84c;
    --gold-light:#e8c97a;
    --cream:     #f9f6f0;
    --bg:        #f0f2f7;
    --white:     #ffffff;
    --text:      #1a1a2e;
    --muted:     #6b7280;
    --success:   #16a34a;
    --danger:    #c0392b;
    --danger-bg: #fdf0ef;
    --shadow-sm: 0 2px 8px rgba(15,30,60,0.08);
    --shadow-md: 0 8px 30px rgba(15,30,60,0.12);
    --shadow-lg: 0 20px 60px rgba(15,30,60,0.18);
    --radius:    14px;
    --radius-sm: 8px;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ── NAVBAR ───────────────────────────────────── */
/* ═══════════════════════════════════════════
   NAVBAR — 2 Baris: Top bar + Menu bar
   ═══════════════════════════════════════════ */

/* Wrapper keseluruhan navbar */
.navbar {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
}

/* ── Baris 1: Logo + User info ────────────── */
.navbar-top {
    padding: 0 40px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-brand span { color: var(--gold); }

.navbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-user {
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.nav-user strong { color: var(--gold-light); font-weight: 600; }

/* Tombol kecil di top bar (logout, notif) */
.nav-btn-sm {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 14px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.15);
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-btn-sm:hover { background: rgba(255,255,255,0.1); color: white; }
.nav-btn-sm.logout:hover { background: #c0392b; border-color: #c0392b; color: white; }
.nav-btn-sm .notif-dot {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 16px; height: 16px;
    background: #e53e3e; color: white;
    font-size: 9px; font-weight: 700;
    border-radius: 50px; padding: 0 4px;
    margin-left: 4px; vertical-align: middle;
}

/* ── Baris 2: Menu Navigasi ───────────────── */
.navbar-menu {
    background: #1e0d3d; /* ungu gelap seperti gambar referensi */
    padding: 0 40px;
    height: 46px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Garis diagonal dekoratif (seperti gambar) */
.navbar-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -60deg,
        transparent,
        transparent 28px,
        rgba(255,255,255,0.025) 28px,
        rgba(255,255,255,0.025) 29px
    );
    pointer-events: none;
}

/* Shimmer kiri */
.navbar-menu::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 40px;
    background: linear-gradient(90deg, rgba(30,13,61,0.8), transparent);
    pointer-events: none;
}

.navbar-menu-list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    position: relative;
    z-index: 1;
    width: 100%;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    padding: 0 20px;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-right: 1px solid rgba(255,255,255,0.07);
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}

.nav-link:hover::after { transform: scaleX(1); }

.nav-link.active {
    background: rgba(201,168,76,0.15);
    color: var(--gold);
}

.nav-link.active::after { transform: scaleX(1); }

/* Logout di kanan */
.nav-link-right {
    margin-left: auto;
    border-right: none;
    border-left: 1px solid rgba(255,255,255,0.07);
}

/* Backward compat — nav-link.logout di top bar */
.nav-link.logout {
    border-color: rgba(255,255,255,0.2);
}
.nav-link.logout:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* ── PAGE WRAPPER ─────────────────────────────── */
.page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 24px;
}

.page-sm {
    max-width: 500px;
    margin: 60px auto;
    padding: 0 24px;
}

/* ── PAGE HEADER ──────────────────────────────── */
.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    color: var(--navy);
    margin-bottom: 4px;
}

.page-header p {
    color: var(--muted);
    font-size: 14px;
    font-weight: 300;
}

/* ── CARD ─────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.card-header {
    background: var(--navy);
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.card-header-icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 1.5px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.card-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--white);
    font-size: 20px;
    font-weight: 600;
}

.card-header p {
    color: var(--gold-light);
    font-size: 12px;
    font-weight: 300;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.card-body {
    padding: 32px;
}

/* ── FORM ELEMENTS ────────────────────────────── */
.field {
    margin-bottom: 20px;
}

.field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e0e4ec;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    background: var(--cream);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.field input:focus,
.field select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
    background: var(--white);
}

.field .info {
    font-size: 13px;
    color: var(--muted);
    padding: 12px 16px;
    background: var(--cream);
    border-radius: var(--radius-sm);
    border: 1.5px solid #e0e4ec;
    font-weight: 500;
}

/* ── BUTTONS ──────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    font-size: 15px;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gold);
}

.btn-primary:hover { background: var(--navy-mid); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid #dde0ec;
    padding: 10px 20px;
}

.btn-secondary:hover {
    background: var(--cream);
    border-color: var(--navy);
}

.btn-gold {
    background: var(--gold);
    color: var(--navy);
    font-weight: 700;
}

.btn-gold:hover { background: var(--gold-light); }

.btn-danger {
    background: var(--danger);
    color: white;
}

/* ── ALERTS ───────────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: var(--danger-bg);
    border-left: 4px solid var(--danger);
    color: var(--danger);
}

.alert-success {
    background: #f0fdf4;
    border-left: 4px solid var(--success);
    color: var(--success);
}

/* ── TABLE ────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

thead tr {
    background: var(--navy);
}

thead th {
    padding: 14px 18px;
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #f0f2f7;
    transition: background 0.15s;
}

tbody tr:hover { background: #fafbff; }

tbody td {
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text);
}

/* ── PRODUCT GRID ─────────────────────────────── */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 3px solid transparent;
    animation: fadeUp 0.4s ease both;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-top-color: var(--gold);
}

.product-icon {
    font-size: 32px;
    margin-bottom: 4px;
}

.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    color: var(--navy);
}

.product-price {
    color: var(--success);
    font-weight: 600;
    font-size: 16px;
}

/* ── DASHBOARD CARDS ──────────────────────────── */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.dash-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gold);
    animation: fadeUp 0.4s ease both;
}

.dash-card-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.dash-card-value {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: var(--navy);
}

/* ── MENU BUTTONS (dashboard) ─────────────────── */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.menu-btn {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--navy);
    box-shadow: var(--shadow-sm);
    border: 1.5px solid transparent;
    transition: all 0.2s;
    animation: fadeUp 0.4s ease both;
}

.menu-btn:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.menu-btn-icon { font-size: 32px; margin-bottom: 12px; }

.menu-btn-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--navy);
}

.menu-btn-desc {
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
}

/* ── BACK LINK ────────────────────────────────── */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover { color: var(--navy); }

/* ── BADGE ────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-gold { background: #fef9ec; color: #92680c; border: 1px solid var(--gold); }
.badge-green { background: #f0fdf4; color: var(--success); border: 1px solid #86efac; }

/* ── ANIMATIONS ───────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate { animation: slideIn 0.5s cubic-bezier(.22,.68,0,1.2) both; }

/* ── DIVIDER ──────────────────────────────────── */
.divider {
    height: 1px;
    background: #eee;
    margin: 24px 0;
}

/* ── TOTAL BOX ────────────────────────────────── */
.total-box {
    background: var(--cream);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1.5px solid #e8e0d0;
    margin: 16px 0 24px;
}

.total-box span { color: var(--muted); font-size: 13px; font-weight: 500; }
.total-box strong { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--success); }

/* ── FOOTER ───────────────────────────────────── */
.footer {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin-top: 20px;
    padding-bottom: 40px;
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 640px) {
    .navbar-top  { padding: 0 16px; height: 50px; }
    .navbar-menu { padding: 0 8px; overflow-x: auto; }
    .navbar-menu::-webkit-scrollbar { display: none; }
    .nav-link { padding: 0 14px; font-size: 11px; letter-spacing: 0.8px; }
    .navbar-brand { font-size: 15px; }
    .page, .page-sm { padding: 0 16px; margin-top: 24px; }
    .card-body { padding: 24px 20px; }
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #eef1f7;
}

.chat-box {
    max-width: 700px;
    margin: 30px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: #0f1e3c;
    color: white;
    padding: 15px;
    font-weight: bold;
}

.chat-window {
    height: 420px;
    overflow-y: auto;
    padding: 15px;
    background: #f5f7fb;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bubble {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 70%;
    font-size: 14px;
    position: relative;
}

.kanan {
    background: #0f1e3c;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.kiri {
    background: #e4e6eb;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.bubble small {
    display: block;
    font-size: 10px;
    margin-top: 5px;
    opacity: 0.7;
}

.chat-input {
    padding: 12px;
    border-top: 1px solid #ddd;
    background: #fff;
}

.chat-input form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chat-input input[type="text"] {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.chat-input input[type="file"] {
    font-size: 12px;
}

.chat-input button {
    background: #0f1e3c;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
}

.chat-input button:hover {
    background: #1c2f5a;
}

img.chat-img {
    max-width: 150px;
    margin-top: 5px;
    border-radius: 10px;
}