/* ─── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #000; color: #ccc; min-height: 100vh;
    display: flex; flex-direction: column;
}
a { color: #fff; text-decoration: none; }
a:hover { color: #888; }

/* ─── Navigation ─────────────────────────────────────────────────── */
nav {
    background: #111; border-bottom: 1px solid #222;
    position: sticky; top: 0; z-index: 100;
}
.nav-inner {
    max-width: 1000px; margin: 0 auto; padding: 12px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; color: #fff !important; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font-size: 13px; color: #888 !important; text-transform: uppercase; letter-spacing: 1px; }
.nav-links a:hover { color: #fff !important; }

/* ─── Main ──────────────────────────────────────────────────────── */
main { flex: 1; max-width: 1000px; margin: 0 auto; padding: 30px 20px; width: 100%; }

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero { text-align: center; padding: 80px 0 50px; }
.hero h1 { font-size: 56px; font-weight: 800; color: #fff; letter-spacing: -2px; }
.subtitle { color: #666; margin: 10px 0 30px; font-size: 18px; }

/* ─── Sections ──────────────────────────────────────────────────── */
.section { margin: 30px 0; }
.section h2 { font-size: 24px; color: #fff; margin-bottom: 20px; }
.section h3 { font-size: 18px; color: #ddd; margin-bottom: 12px; }

/* ─── Grid / Cards ──────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 15px; }
.card {
    background: #111; border: 1px solid #222; border-radius: 8px; padding: 20px;
    transition: 0.2s; display: flex; flex-direction: column; gap: 8px;
}
.card:hover { border-color: #444; background: #181818; }
.card h3 { color: #fff; font-size: 16px; }
.badge { color: #666; font-size: 13px; }
.type-badge { color: #999; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.empty { color: #555; font-style: italic; }

/* ─── Product List ──────────────────────────────────────────────── */
.product-list { display: flex; flex-direction: column; gap: 8px; }
.product-card {
    background: #111; border: 1px solid #222; border-radius: 6px;
    padding: 15px 20px; display: flex; align-items: center; gap: 15px;
}
.product-card.bought { border-color: #333; }
.product-id { color: #555; font-size: 13px; min-width: 40px; }
.product-price { color: #fff; font-weight: 600; flex: 1; }
.product-cat { color: #888; flex: 1; }
.product-date { color: #555; font-size: 13px; }

/* ─── Purchase Box ──────────────────────────────────────────────── */
.purchase-box {
    background: #111; border: 1px solid #333; border-radius: 8px;
    padding: 30px; margin: 20px 0;
}
.purchase-box pre {
    color: #0f0; font-family: "Courier New", monospace;
    font-size: 16px; white-space: pre-wrap; word-break: break-all;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-block; background: #fff; color: #000 !important;
    padding: 10px 24px; border-radius: 6px; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer;
    text-decoration: none !important; transition: 0.2s;
}
.btn:hover { background: #ccc; }
.btn.small { padding: 6px 16px; font-size: 13px; }
.btn.tiny { padding: 4px 10px; font-size: 11px; }
.danger-btn { background: #600 !important; color: #fff !important; }
.danger-btn:hover { background: #800 !important; }
.back { color: #666; font-size: 14px; display: inline-block; margin-bottom: 10px; }
.back:hover { color: #fff; }

/* ─── Forms ──────────────────────────────────────────────────────── */
.form-page { max-width: 400px; margin: 50px auto; text-align: center; }
.form { display: flex; flex-direction: column; gap: 10px; }
.form.inline { flex-direction: row; }
.form-card { margin: 20px 0; }
.form-card.danger { border-color: #400; }
input, select, textarea {
    background: #111; border: 1px solid #333; border-radius: 6px;
    padding: 10px 14px; color: #fff; font-size: 14px; font-family: inherit;
    transition: 0.2s; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: #666; outline: none; }
textarea { resize: vertical; min-height: 80px; }
.small-input { width: auto; padding: 4px 8px; font-size: 12px; }
.hint { color: #555; font-size: 13px; }

/* ─── Flash messages ────────────────────────────────────────────── */
.flash {
    padding: 12px 20px; border-radius: 6px; margin-bottom: 15px;
    font-size: 14px; text-align: center;
}
.flash.success { background: #030; border: 1px solid #060; color: #0f0; }
.flash.error { background: #300; border: 1px solid #600; color: #f66; }
.flash.info { background: #003; border: 1px solid #006; color: #66f; }

/* ─── Admin Nav ──────────────────────────────────────────────────── */
.admin-nav {
    display: flex; gap: 0; margin-bottom: 20px;
    border-bottom: 1px solid #222; flex-wrap: wrap;
}
.admin-nav a {
    padding: 10px 16px; font-size: 13px; color: #666 !important;
    border-bottom: 2px solid transparent; transition: 0.2s;
}
.admin-nav a:hover, .admin-nav a.active { color: #fff !important; border-color: #fff; }

/* ─── Stats ──────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }
.stat-card {
    background: #111; border: 1px solid #222; border-radius: 8px;
    padding: 20px; text-align: center;
}
.stat-num { display: block; font-size: 32px; font-weight: 700; color: #fff; }
.stat-label { color: #666; font-size: 13px; margin-top: 4px; }

/* ─── Tables ──────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #222; }
th { color: #666; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
td { color: #ccc; }
.scroll { overflow-x: auto; }
.content-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Misc ──────────────────────────────────────────────────────── */
.inline { display: inline-flex; }
.note { color: #999; font-size: 14px; padding: 10px; background: #111; border-radius: 6px; margin-bottom: 15px; }
.profile-info p { margin: 8px 0; font-size: 15px; }
