@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
    --ink: #1B2340;
    --ink-soft: #4A5378;
    --paper: #F7F8FC;
    --paper-alt: #EDEFF7;
    --card: #FFFFFF;
    --border: #DDE1F0;
    --brand: #2D6CDF;
    --brand-dark: #1E4FB0;
    --seal: #C9A227;
    --seal-soft: #F3E9C9;
    --success: #1F9D55;
    --success-bg: #E4F7EC;
    --error: #D64545;
    --error-bg: #FDEAEA;
    --pending-bg: #FFF4DE;
    --pending-ink: #9A6A00;
    --radius: 10px;
    --font-display: 'Sora', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, Segoe UI, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
}

h1, h2, h3 {
    font-family: var(--font-display);
    color: var(--ink);
    margin: 0 0 12px;
}

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

img { max-width: 100%; display: block; }

/* ---------- Store header / footer ---------- */
.store-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.store-header-inner {
    max-width: 1100px; margin: 0 auto; padding: 18px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.store-logo {
    font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--ink);
    text-decoration: none;
}
.store-header nav a { color: var(--ink-soft); font-weight: 600; margin-left: 20px; text-decoration: none; }
.store-footer {
    text-align: center; padding: 40px 20px; color: var(--ink-soft); font-size: 13px;
    border-top: 1px solid var(--border); margin-top: 60px;
}

/* ---------- Hero (signature: certificate seal motif) ---------- */
.hero {
    max-width: 900px; margin: 0 auto; padding: 70px 24px 40px; text-align: center; position: relative;
}
.hero h1 {
    font-size: 40px; font-weight: 800; letter-spacing: -0.5px;
}
.hero::before {
    content: '✓ CERTIFIED LICENSES';
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 12px; letter-spacing: 2px; font-weight: 600;
    color: var(--seal);
    background: var(--seal-soft);
    border: 1px solid var(--seal);
    border-radius: 999px;
    padding: 5px 16px;
    margin-bottom: 18px;
}
.hero p { color: var(--ink-soft); font-size: 17px; }

/* ---------- Product grid ---------- */
.product-grid {
    max-width: 1100px; margin: 0 auto 60px; padding: 0 24px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px;
}
.product-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; text-decoration: none; color: var(--ink);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(27,35,64,0.08); text-decoration: none; }
.product-card img { width: 100%; height: 160px; object-fit: cover; }
.product-card-placeholder {
    width: 100%; height: 160px; display: flex; align-items: center; justify-content: center;
    background: var(--paper-alt); font-size: 42px;
}
.product-card-placeholder.large { height: 320px; border-radius: var(--radius); }
.product-card-body { padding: 16px 18px 20px; }
.product-card-body h3 { font-size: 17px; margin-bottom: 6px; }
.product-card-body p { font-size: 13px; color: var(--ink-soft); margin: 0 0 12px; min-height: 34px; }
.price, .price-large {
    font-family: var(--font-mono); font-weight: 600; color: var(--brand-dark);
}
.price { font-size: 16px; }
.price-large { font-size: 26px; margin: 6px 0 18px; }

/* ---------- Single product ---------- */
.single-product { max-width: 1000px; margin: 0 auto; padding: 40px 24px 60px; }
.single-product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.single-product-image img { border-radius: var(--radius); border: 1px solid var(--border); }
.short-desc { color: var(--ink-soft); font-size: 15px; }
.feature-list { list-style: none; padding: 0; margin: 0 0 24px; font-size: 14px; }
.feature-list li { margin-bottom: 8px; }
.single-product-description { margin-top: 50px; border-top: 1px solid var(--border); padding-top: 30px; }
@media (max-width: 700px) { .single-product-grid { grid-template-columns: 1fr; } }

/* ---------- Checkout ---------- */
.checkout-page { max-width: 900px; margin: 0 auto; padding: 40px 24px 80px; }
.checkout-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; align-items: start; }
@media (max-width: 700px) { .checkout-grid { grid-template-columns: 1fr; } }
.payment-buttons { margin-top: 22px; }

/* ---------- Cards / shared components ---------- */
.card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin-bottom: 22px;
}
.card h2 { font-size: 17px; margin-bottom: 16px; }

label { display: block; font-weight: 600; font-size: 13px; margin: 14px 0 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; font-family: var(--font-body); background: var(--paper); color: var(--ink);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.hint { font-size: 12px; color: var(--ink-soft); margin: 4px 0 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.btn {
    display: inline-block; border: none; border-radius: 8px; padding: 11px 20px;
    font-size: 14px; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none;
    font-family: var(--font-body);
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-secondary { background: var(--paper-alt); color: var(--ink); }
.btn-block { width: 100%; }
.btn-large { padding: 14px 28px; font-size: 16px; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-paid, .badge-active { background: var(--success-bg); color: var(--success); }
.badge-pending { background: var(--pending-bg); color: var(--pending-ink); }
.badge-failed, .badge-revoked, .badge-expired { background: var(--error-bg); color: var(--error); }

/* ---------- License key display (signature element) ---------- */
.license-chip {
    font-family: var(--font-mono); font-weight: 600; letter-spacing: 1px;
    background: var(--seal-soft); border: 1px dashed var(--seal); border-radius: 8px;
    padding: 10px 16px; display: inline-block; color: #6b5510;
}

/* ---------- Admin layout ---------- */
.admin-body { background: var(--paper-alt); }
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: var(--ink); color: #fff; flex-shrink: 0;
    padding: 24px 0; position: sticky; top: 0; height: 100vh;
}
.admin-logo { font-family: var(--font-display); font-weight: 700; padding: 0 20px 20px; font-size: 17px; }
.admin-sidebar nav { display: flex; flex-direction: column; }
.admin-sidebar nav a {
    color: #C7CCE6; text-decoration: none; padding: 11px 20px; font-size: 14px; font-weight: 500;
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,0.08); color: #fff; }
.admin-sidebar nav a.logout { margin-top: auto; color: #F0A0A0; }
.admin-main { flex: 1; padding: 32px 36px; max-width: 1100px; }
.page-title { font-size: 22px; margin-bottom: 20px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; }
.stat-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table th {
    text-align: left; padding: 10px 12px; background: var(--paper-alt); color: var(--ink-soft);
    font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600;
}
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.detail-table td { padding: 8px 12px 8px 0; font-size: 14px; }
.detail-table td:first-child { color: var(--ink-soft); width: 180px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; }
.search-form { display: flex; gap: 8px; }
.search-form input { min-width: 260px; }

.actions-cell { white-space: nowrap; }
.link-btn {
    background: none; border: none; color: var(--brand); cursor: pointer; font-size: 13px;
    padding: 0; font-family: var(--font-body); text-decoration: underline;
}
.link-btn:hover { color: var(--brand-dark); }

/* ---------- Login ---------- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--paper-alt); }
.login-box {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 40px; width: 100%; max-width: 360px;
}
.login-box h1 { font-size: 20px; text-align: center; }
.login-box .sub { text-align: center; color: var(--ink-soft); font-size: 13px; margin-top: -8px; margin-bottom: 20px; }
