/* =========================================================
   Shoptify.co — Design System
   Plain CSS ไม่พึ่ง framework ภายนอก
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
    /* Colors */
    --primary:        #6366f1;
    --primary-dark:   #4f46e5;
    --primary-light:  #e0e7ff;
    --success:        #10b981;
    --success-dark:   #059669;
    --success-light:  #d1fae5;
    --warning:        #f59e0b;
    --warning-light:  #fef3c7;
    --danger:         #ef4444;
    --danger-light:   #fee2e2;
    --info:           #3b82f6;
    --info-light:     #dbeafe;
    --purple:         #8b5cf6;
    --purple-light:   #ede9fe;
    --pink:           #ec4899;
    --pink-light:     #fce7f3;

    /* Neutrals */
    --bg:             #f1f5f9;
    --surface:        #ffffff;
    --border:         #e2e8f0;
    --text:           #1e293b;
    --text-muted:     #64748b;
    --text-light:     #94a3b8;

    /* Layout */
    --sidebar-w:      260px;
    --radius:         12px;
    --radius-sm:      8px;
    --shadow:         0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg:      0 10px 25px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);

    /* Typography */
    --font:           'Segoe UI', system-ui, -apple-system, 'Sarabun', 'Thonburi', sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: inherit; }
code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: .9em; }

/* ---------- Helpers ---------- */
.text-primary { color: var(--primary); }
.muted { color: var(--text-muted); }
.small { font-size: .85em; }
.mt { margin-top: 1.5rem; }

/* =========================================================
   Auth (login page)
   ========================================================= */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 1.5rem;
}
.auth-wrapper { width: 100%; max-width: 400px; }
.auth-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-mark {
    display: inline-flex;
    width: 56px; height: 56px;
    background: var(--primary);
    color: #fff;
    border-radius: 16px;
    font-size: 1.8rem;
    font-weight: 700;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.auth-logo h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.auth-logo p { color: var(--text-muted); font-size: .9rem; }
.auth-hint {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: .85rem;
}
.auth-hint code { font-size: .9em; }

/* =========================================================
   App Shell (sidebar + main)
   ========================================================= */
.app-shell { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 100;
    transition: transform .25s ease;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.25rem;
    font-weight: 700;
}
.brand-mark {
    display: inline-flex;
    width: 36px; height: 36px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem .9rem;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
    transition: all .15s ease;
}
.sidebar-nav a:hover {
    background: var(--bg);
    color: var(--text);
    text-decoration: none;
}
.sidebar-nav a.is-active {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
}
.nav-icon { width: 22px; text-align: center; font-size: 1.05rem; }
.sidebar-footer { padding: .75rem; border-top: 1px solid var(--border); }
.nav-link-danger {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem .9rem;
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-weight: 500;
}
.nav-link-danger:hover { background: var(--danger-light); text-decoration: none; }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* ---------- Main ---------- */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .85rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-title { font-size: 1.15rem; font-weight: 600; flex: 1; }
.icon-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-muted);
    padding: .25rem .5rem;
    border-radius: 6px;
}
.icon-btn:hover { background: var(--bg); }
.sidebar-toggle { display: none; }
.topbar-user { display: flex; align-items: center; gap: .65rem; }
.user-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-weight: 600; font-size: .9rem; }
.user-level { font-size: .75rem; color: var(--text-muted); }

.content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1100px;
    width: 100%;
}

/* =========================================================
   Components
   ========================================================= */

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: .92rem;
}
.alert-icon {
    display: inline-flex;
    width: 22px; height: 22px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .8rem;
    flex-shrink: 0;
}
.alert-success { background: var(--success-light); color: var(--success-dark); }
.alert-success .alert-icon { background: var(--success); color: #fff; }
.alert-error { background: var(--danger-light); color: var(--danger); }
.alert-error .alert-icon { background: var(--danger); color: #fff; }
.alert-warning { background: var(--warning-light); color: #92400e; }
.alert-warning .alert-icon { background: var(--warning); color: #fff; }
.alert-info { background: var(--info-light); color: #1e40af; }
.alert-info .alert-icon { background: var(--info); color: #fff; }

/* Page head */
.page-head { margin-bottom: 1.5rem; }
.page-head h2 { font-size: 1.5rem; }

/* Card grid (stat cards) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    color: var(--text);
    transition: transform .15s ease, box-shadow .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-value { font-size: 1.25rem; font-weight: 700; }
.stat-label { font-size: .85rem; color: var(--text-muted); }

/* color variants for stat icons */
.stat-primary .stat-icon { background: var(--primary-light); color: var(--primary); }
.stat-success .stat-icon { background: var(--success-light); color: var(--success); }
.stat-info .stat-icon    { background: var(--info-light); color: var(--info); }
.stat-warning .stat-icon { background: var(--warning-light); color: var(--warning); }
.stat-purple .stat-icon  { background: var(--purple-light); color: var(--purple); }
.stat-pink .stat-icon    { background: var(--pink-light); color: var(--pink); }

/* Section */
.section { margin-top: 2rem; }
.section-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}

/* Quick actions */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.quick-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    text-align: center;
    color: var(--text);
    transition: all .15s ease;
}
.quick-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
    transform: translateY(-2px);
}
.quick-icon { font-size: 1.8rem; }

/* Info grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.info-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.info-label { font-size: .78rem; color: var(--text-muted); }
.info-value { font-weight: 600; }

/* Badges */
.badge {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.badge-success { background: var(--success-light); color: var(--success-dark); }
.badge-info    { background: var(--info-light); color: #1e40af; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-muted   { background: #f1f5f9; color: var(--text-muted); }

/* Balance hero */
.balance-hero {
    border-radius: var(--radius);
    padding: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.balance-success { background: linear-gradient(135deg, var(--success) 0%, var(--success-dark) 100%); }
.balance-info    { background: linear-gradient(135deg, var(--info) 0%, #1d4ed8 100%); }
.balance-label { opacity: .9; font-size: .9rem; margin-bottom: .25rem; }
.balance-amount { font-size: 2.25rem; font-weight: 700; line-height: 1.2; }
.balance-actions { margin-top: 1rem; display: flex; gap: .5rem; }
.btn-sm { padding: .35rem .85rem; font-size: .82rem; border-radius: var(--radius-sm); }
.btn-light { background: rgba(255,255,255,.25); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn-light:hover { background: rgba(255,255,255,.35); text-decoration: none; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: .92rem;
    transition: all .15s ease;
    cursor: pointer;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; text-decoration: none; color: #fff; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); text-decoration: none; }
.btn-block { width: 100%; }

/* Forms */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-weight: 500; font-size: .88rem; }
.form-group input,
.form-group select,
.form-group textarea {
    padding: .65rem .85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}
.form-group input:disabled { background: #f8fafc; color: var(--text-muted); }
.form-actions { display: flex; gap: .65rem; margin-top: .5rem; }
.columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Quick amount buttons */
.quick-amounts { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.quick-amounts button {
    flex: 1;
    min-width: 60px;
    padding: .5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--text-muted);
    transition: all .15s ease;
}
.quick-amounts button:hover { border-color: var(--primary); color: var(--primary); }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: .5rem; }

/* Input group */
.input-group { display: flex; gap: .5rem; }
.input-group input { flex: 1; padding: .65rem .85rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ref-row { margin-bottom: 1rem; }
.ref-row > label { display: block; font-weight: 500; font-size: .88rem; margin-bottom: .35rem; }

/* Stats row (3 columns) */
.stats-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}
.stat-num { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.stat-box-warning .stat-num { color: var(--warning); }
.stat-cap { font-size: .82rem; color: var(--text-muted); margin-top: .25rem; }

/* Level card */
.level-card {
    background: linear-gradient(135deg, var(--purple) 0%, var(--primary) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.level-badge {
    width: 80px; height: 80px;
    background: rgba(255,255,255,.2);
    border: 2px solid rgba(255,255,255,.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    flex-shrink: 0;
}
.level-info { flex: 1; }
.level-info h2 { margin-bottom: .35rem; }
.level-info .muted { color: rgba(255,255,255,.85); }
.progress {
    height: 10px;
    background: rgba(255,255,255,.25);
    border-radius: 999px;
    overflow: hidden;
    margin: .65rem 0 .35rem;
}
.progress-bar {
    height: 100%;
    background: #fff;
    border-radius: 999px;
    transition: width .4s ease;
}

/* Mission list */
.mission-list { display: flex; flex-direction: column; gap: .65rem; }
.mission-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .85rem 1rem;
}
.mission-icon { font-size: 1.5rem; width: 32px; text-align: center; }
.mission-body { flex: 1; }
.mission-title { font-weight: 500; }

/* Profile header */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.profile-avatar {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Placeholder page */
.placeholder-page {
    text-align: center;
    padding: 3rem 1.5rem;
}
.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: .8;
}
.placeholder-title { font-size: 1.75rem; margin-bottom: .5rem; }
.placeholder-subtitle { font-size: 1.1rem; margin-bottom: .5rem; }
.placeholder-desc { max-width: 480px; margin: 0 auto 1.5rem; }
.placeholder-badge { margin-bottom: 1.5rem; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .sidebar-toggle { display: block; }
    .main { margin-left: 0; }
    .content { padding: 1rem; }
    .columns, .form-row { grid-template-columns: 1fr; }
    .stats-3 { grid-template-columns: 1fr; }
    .balance-amount { font-size: 1.75rem; }
    .level-card { flex-direction: column; text-align: center; }
    .user-meta { display: none; }
    .table-wrap { overflow-x: auto; }
    .table { min-width: 480px; }
    .filter-bar { overflow-x: auto; flex-wrap: nowrap; }
    .chip { white-space: nowrap; }
}

/* =========================================================
   Reward-specific components
   ========================================================= */

/* Text colors */
.text-success { color: var(--success-dark); }
.text-danger  { color: var(--danger); }
.text-right   { text-align: right; }

/* Section head (title + action) */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--border);
}
.section-head .section-title { margin: 0; padding: 0; border: none; }

/* Page head with action */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.page-head h2 { font-size: 1.5rem; }

/* Button variants */
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: var(--success-dark); text-decoration: none; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Daily login card */
.daily-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.daily-info { display: flex; align-items: center; gap: 1rem; }
.daily-info .mission-icon { font-size: 2rem; }

/* Table */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.table th {
    background: #f8fafc;
    text-align: left;
    padding: .85rem 1rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    border-bottom: 1px solid var(--border);
}
.table td {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #f8fafc; }

/* Filter chips */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin: 1.5rem 0;
}
.chip {
    display: inline-block;
    padding: .4rem .9rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .85rem;
    font-weight: 500;
    transition: all .15s ease;
}
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}
.page-link {
    padding: .5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    background: var(--surface);
    transition: all .15s ease;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-info { color: var(--text-muted); font-size: .9rem; }

/* =========================================================
   Coupon-specific components
   ========================================================= */

/* Stat box success variant */
.stat-box-success .stat-num { color: var(--success-dark); }

/* Coupon grid */
.coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Coupon card (ticket style) */
.coupon-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: stretch;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}
.coupon-card:hover:not(.is-expired) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.coupon-card.is-expired {
    opacity: .6;
    background: #f8fafc;
}

/* coupon body */
.coupon-body {
    flex: 1;
    padding: 1.1rem 1.25rem;
    position: relative;
}
.coupon-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: .15rem;
}
.coupon-card.is-expired .coupon-value { color: var(--text-muted); }

.coupon-title {
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--text);
}
.coupon-code {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: .35rem;
}
.coupon-code strong { color: var(--text); }
.coupon-meta {
    font-size: .76rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* divider with notch (ticket effect) */
.coupon-body::after {
    content: '';
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 70%;
    border-left: 2px dashed var(--border);
}

/* coupon actions */
.coupon-actions {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    flex-shrink: 0;
}
.coupon-redeem-form { display: flex; }

/* =========================================================
   Affiliate-specific components
   ========================================================= */

/* Link list */
.link-list { display: flex; flex-direction: column; gap: 1rem; }

/* Link card */
.link-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow);
}
.link-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
    flex-wrap: wrap;
}
.link-card-head .link-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-right: .5rem;
}
.link-type {
    font-size: .82rem;
    color: var(--primary);
    background: var(--primary-light);
    padding: .2rem .6rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* URL row (copyable) */
.link-url-row {
    display: flex;
    gap: .5rem;
    margin-bottom: .5rem;
}
.link-url-row input {
    flex: 1;
    padding: .55rem .85rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
    font-family: monospace;
    font-size: .88rem;
    color: var(--text-muted);
}
.link-meta {
    font-size: .8rem;
    color: var(--text-light);
}
