/* all.gift - Platform Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap');

:root {
    --brand: #1D9E75;
    --brand-dark: #0F6E56;
    --brand-light: #E1F5EE;
    --bg: #FAFAF9;
    --surface: #FFFFFF;
    --text: #18181B;
    --text-secondary: #71717A;
    --text-muted: #A1A1AA;
    --border: #E4E4E7;
    --border-light: #F4F4F5;
    --danger: #DC2626;
    --danger-light: #FEF2F2;
    --warning: #D97706;
    --warning-light: #FFFBEB;
    --success: #16A34A;
    --success-light: #F0FDF4;
    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

/* Layout */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.container-md { max-width: 800px; margin: 0 auto; padding: 0 24px; }

/* Nav */
.nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.nav-logo {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: -0.5px;
}
.nav-logo span { color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--brand); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn-primary {
    background: var(--brand);
    color: white;
}
.btn-primary:hover { background: var(--brand-dark); color: white; }
.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover { background: var(--border-light); color: var(--text); }
.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.card-flush { border: none; box-shadow: var(--shadow); }

/* Forms */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: var(--font);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(29,158,117,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Stat cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.stat-label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.stat-value { font-size: 28px; font-weight: 700; margin-top: 4px; letter-spacing: -0.5px; }
.stat-change { font-size: 12px; margin-top: 4px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); font-size: 14px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--border-light); }

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--brand-light); color: var(--brand-dark); }

/* Flash messages */
.flash {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.flash-success { background: var(--success-light); color: var(--success); border: 1px solid #bbf7d0; }
.flash-error { background: var(--danger-light); color: var(--danger); border: 1px solid #fecaca; }
.flash-info { background: var(--brand-light); color: var(--brand-dark); border: 1px solid #9FE1CB; }

/* Gift card preview */
.gc-preview {
    width: 360px;
    max-width: 100%;
    aspect-ratio: 1.6;
    border-radius: 14px;
    padding: 28px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.gc-preview::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}
.gc-preview::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: -25px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
}
.gc-biz-name { font-size: 20px; font-weight: 600; position: relative; z-index: 1; }
.gc-label { font-size: 11px; opacity: 0.8; text-transform: uppercase; letter-spacing: 1.5px; margin-top: 4px; }
.gc-amount { font-size: 32px; font-weight: 700; position: relative; z-index: 1; }
.gc-url { font-size: 11px; opacity: 0.6; position: relative; z-index: 1; }
.gc-bottom { display: flex; justify-content: space-between; align-items: flex-end; position: relative; z-index: 1; }

/* Amount selector */
.amount-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.amount-btn {
    padding: 12px 20px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: white;
    transition: all 0.15s;
    font-family: var(--font);
    min-width: 80px;
    text-align: center;
}
.amount-btn:hover { border-color: var(--brand); }
.amount-btn.active {
    border-color: var(--brand);
    background: var(--brand-light);
    color: var(--brand-dark);
}

/* Upload area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    color: var(--text-secondary);
}
.upload-area:hover { border-color: var(--brand); background: var(--brand-light); }

/* Color picker */
.color-options { display: flex; gap: 10px; }
.color-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.15s;
}
.color-dot:hover { transform: scale(1.1); }
.color-dot.active { border-color: var(--text); box-shadow: 0 0 0 2px white, 0 0 0 4px var(--text); }

/* Template picker */
.template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.template-opt {
    padding: 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s;
}
.template-opt:hover { border-color: var(--brand); }
.template-opt.active { border-color: var(--brand); background: var(--brand-light); color: var(--brand-dark); }

/* Hero section */
.hero {
    padding: 80px 0 60px;
    text-align: center;
}
.hero h1 {
    font-size: 52px;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
}
.hero h1 em {
    font-style: normal;
    color: var(--brand);
}
.hero p {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.6;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; }

/* Features grid */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 60px 0;
}
@media (max-width: 768px) { .features { grid-template-columns: 1fr; } }
.feature-card {
    padding: 28px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface);
}
.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--brand-light);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
}
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 40px 0; }
@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; } }
.pricing-card { padding: 32px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); }
.pricing-card.featured { border: 2px solid var(--brand); position: relative; }
.pricing-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: white; padding: 4px 16px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pricing-price { font-size: 36px; font-weight: 700; margin: 16px 0 4px; }
.pricing-price span { font-size: 16px; font-weight: 400; color: var(--text-secondary); }

/* Storefront page */
.store-header { text-align: center; padding: 40px 0 24px; }
.store-logo {
    width: 240px;
    height: 120px;
    border-radius: 20px;
    font-size: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
}
.store-name { font-size: 24px; font-weight: 700; }
.store-tagline { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* Redemption */
.redeem-box {
    max-width: 440px;
    margin: 60px auto;
    text-align: center;
}
.code-input {
    font-family: var(--mono);
    font-size: 22px;
    text-align: center;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 16px;
}

/* Utilities */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: 13px; }
.text-mono { font-family: var(--mono); }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 16px; }
.hidden { display: none; }

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 60px;
}
