:root {
    --bg: #FAF7F2;
    --bg-warm: #F3EDE4;
    --bg-card: #fff;
    --text: #1a1714;
    --text-mid: #5a524a;
    --text-light: #9a8f84;
    --accent: #c4623a;
    --accent-soft: rgba(196,98,58,0.1);
    --border: #e5ddd3;
    --serif: 'Playfair Display', Georgia, serif;
    --sans: 'Outfit', -apple-system, sans-serif;
  }

  * { margin:0; padding:0; box-sizing:border-box; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 300;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }
  ::selection { background: var(--accent); color: #fff; }

  /* --- Nav --- */
  nav {
    position: fixed; top:0; left:0; right:0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.3rem 5vw;
    background: rgba(250,247,242,0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
  }
  .logo {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
  }
  .logo span { color: var(--accent); }
  .nav-links { display:flex; gap: 2.5rem; align-items:center; }
  .nav-links a {
    font-size: 0.85rem; font-weight: 400;
    color: var(--text-mid);
    text-decoration: none;
    transition: color 0.3s;
  }
  .nav-links a:hover { color: var(--text); }
  .btn-nav {
    padding: 0.55rem 1.5rem;
    background: var(--accent);
    color: #fff;
    border: none; border-radius: 100px;
    font-size: 0.82rem; font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--sans);
    transition: transform 0.2s, box-shadow 0.3s;
  }
  .btn-nav:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(196,98,58,0.25);
  }

  /* --- Hero --- */
  .hero {
    min-height: 100vh;
    display: flex; align-items: center;
    padding: 0 5vw;
  }
  .hero-inner {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
  }
  .hero-text { animation: fadeUp 0.8s ease both; }
  .hero-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding: 0.35em 1.2em;
    border: 1px solid var(--accent);
    border-radius: 100px;
  }
  .hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.8rem, 5vw, 4.2rem);
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    color: var(--text);
  }
  .hero h1 em { font-style: italic; color: var(--accent); }
  .hero p {
    font-size: 1.05rem;
    color: var(--text-mid);
    line-height: 1.75;
    max-width: 460px;
    margin-bottom: 2.5rem;
  }

  /* Hero visual */
  .hero-visual {
    animation: fadeUp 0.8s ease 0.2s both;
    position: relative;
  }
  .hero-card-mock {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 24px 60px rgba(26,23,20,0.06);
  }
  .mock-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1.8rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
  }
  .mock-header h4 {
    font-size: 0.85rem; font-weight: 500;
  }
  .mock-badge {
    padding: 0.2em 0.8em;
    background: #e8f9e8;
    color: #2a7a2a;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
  }
  .mock-rows { display: flex; flex-direction: column; gap: 0.9rem; }
  .mock-row {
    display: grid;
    grid-template-columns: 1fr 0.6fr 0.8fr;
    gap: 1rem;
    align-items: center;
    padding: 0.7rem 0;
    border-bottom: 1px solid #f3ede4;
    font-size: 0.82rem;
  }
  .mock-flag { font-size: 1.1rem; margin-right: 0.4rem; }
  .mock-row .text-dim { color: var(--text-light); font-size: 0.78rem; }
  .mock-bar-wrap {
    height: 6px;
    background: var(--bg-warm);
    border-radius: 100px;
    overflow: hidden;
  }
  .mock-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 100px;
  }

  .btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.9rem 2.2rem;
    background: var(--accent); color: #fff;
    border: none; border-radius: 100px;
    font-size: 0.95rem; font-weight: 500;
    cursor: pointer; text-decoration: none;
    font-family: var(--sans);
    transition: transform 0.2s, box-shadow 0.3s;
  }
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(196,98,58,0.25);
  }
  .btn-primary svg { width: 16px; height: 16px; }
  .btn-ghost {
    display: inline-flex;
    padding: 0.9rem 2rem;
    background: transparent; color: var(--text-mid);
    border: 1px solid var(--border); border-radius: 100px;
    font-size: 0.95rem;
    cursor: pointer; text-decoration: none;
    font-family: var(--sans);
    transition: border-color 0.3s, color 0.3s;
  }
  .btn-ghost:hover { border-color: var(--text-mid); color: var(--text); }
  .hero-actions { display: flex; gap: 1rem; }

  /* --- Section shared --- */
  section { padding: 7rem 5vw; }
  .container { max-width: 1100px; margin: 0 auto; }
  .section-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.8rem;
  }
  .section-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 0.8rem;
  }
  .section-sub {
    color: var(--text-mid);
    font-size: 1.02rem;
    max-width: 500px;
    line-height: 1.7;
  }

  /* --- Features --- */
  .features-section { background: var(--bg-warm); }
  .features-header { text-align: center; margin-bottom: 4rem; }
  .features-header .section-sub { margin: 0 auto; }
  .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
  }
  .feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.2rem 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(26,23,20,0.06);
  }
  .feature-icon {
    width: 44px; height: 44px;
    background: var(--accent-soft);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.2rem;
    color: var(--accent);
    font-size: 1.3rem;
  }
  .feature-card h3 {
    font-weight: 500; font-size: 1.08rem;
    margin-bottom: 0.6rem;
  }
  .feature-card p {
    color: var(--text-mid);
    font-size: 0.9rem;
    line-height: 1.65;
  }

  /* --- Testimonials --- */
  .testimonials-section { background: var(--bg); }
  .testimonials-header { margin-bottom: 3.5rem; }
  .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    display: flex; flex-direction: column; gap: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
  }
  .testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(26,23,20,0.05);
  }
  .testimonial-stars {
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
  }
  .testimonial-card blockquote {
    color: var(--text-mid);
    font-size: 0.92rem;
    line-height: 1.7;
    flex: 1;
  }
  .testimonial-author { display:flex; align-items:center; gap: 0.8rem; }
  .testimonial-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--accent-soft);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.75rem; color: var(--accent);
  }
  .testimonial-name { font-weight: 500; font-size: 0.85rem; }
  .testimonial-role { font-size: 0.75rem; color: var(--text-light); }

  /* --- CTA --- */
  .cta-section {
    background: var(--text);
    color: var(--bg);
    text-align: center;
    border-radius: 24px;
    margin: 0 5vw 5rem;
    padding: 5rem 3rem;
    position: relative;
    overflow: hidden;
  }
  .cta-section::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 60%; height: 200%;
    background: radial-gradient(circle, rgba(196,98,58,0.12) 0%, transparent 60%);
    pointer-events: none;
  }
  .cta-section .section-label { color: var(--accent); }
  .cta-section .section-title { color: var(--bg); max-width: 500px; margin: 0 auto 0.8rem; }
  .cta-section .section-sub { color: #a09a92; max-width: 440px; margin: 0 auto 2.5rem; }
  .cta-section .btn-primary { background: var(--accent); color: #fff; }

  /* --- Footer --- */
  footer {
    padding: 2.5rem 5vw;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem;
    border-top: 1px solid var(--border);
  }
  footer small { color: var(--text-light); font-size: 0.78rem; }
  .footer-links { display:flex; gap: 2rem; }
  .footer-links a {
    color: var(--text-light); font-size: 0.78rem; text-decoration: none;
    transition: color 0.3s;
  }
  .footer-links a:hover { color: var(--text-mid); }

  @keyframes fadeUp {
    from { opacity:0; transform: translateY(24px); }
    to { opacity:1; transform: translateY(0); }
  }

  @media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .features-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
  }
  @media (max-width: 768px) {
    .nav-links a:not(.btn-nav) { display: none; }
    .cta-section { margin: 0 3vw 3rem; padding: 3.5rem 1.5rem; }
  }

  .mockup-label {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
    background: var(--accent); color: #fff;
    padding: 0.5rem 1.5rem; border-radius: 100px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
    text-transform: uppercase; z-index: 200;
    box-shadow: 0 4px 20px rgba(196,98,58,0.3);
    font-family: var(--sans);
  }

.testimonial-avatar { padding: 0; overflow: hidden; }
.testimonial-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Legal pages (terms, privacy) */
.page-container { max-width: 800px; margin: 0 auto; padding: 7rem 1.5rem 2rem; }
.page-title { font-family: var(--serif); font-size: 2rem; font-weight: 400; margin-bottom: 0.4rem; }
.legal-content { max-width: 700px; }
.legal-content .last-updated { font-size: 0.82rem; color: var(--text-light); margin-bottom: 2rem; }
.legal-content h2 { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; margin: 2rem 0 0.8rem; color: var(--text); }
.legal-content p { color: var(--text-mid); font-size: 0.9rem; line-height: 1.75; margin-bottom: 0.8rem; }

/* Auth forms (login, register) */
.login-wrapper { min-height: calc(100vh - 100px); display: flex; align-items: center; justify-content: center; padding: 6rem 4vw 3rem; background: var(--bg-warm); }
.login-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; padding: 3rem 2.8rem; width: 100%; max-width: 420px; box-shadow: 0 16px 48px rgba(26,23,20,0.06); }
.login-card h1 { font-family: var(--serif); font-size: 2rem; font-weight: 400; margin-bottom: 0.3rem; color: var(--text); }
.login-card .sub { color: var(--text-light); font-size: 0.92rem; margin-bottom: 2.2rem; }
.login-error { background: rgba(196,98,58,0.08); border: 1px solid rgba(196,98,58,0.25); color: #c4623a; padding: 0.7rem 1rem; border-radius: 8px; font-size: 0.85rem; margin-bottom: 1.4rem; }
.form-error { color: #c4623a; font-size: 0.78rem; margin-top: 0.4rem; }
.form-group { margin-bottom: 1.4rem; }
.form-label { display: block; font-size: 0.78rem; font-weight: 500; color: var(--text-mid); margin-bottom: 0.5rem; letter-spacing: 0.04em; text-transform: uppercase; }
.form-input { width: 100%; padding: 0.75rem 1rem; background: #fff; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 0.92rem; font-family: var(--sans); outline: none; transition: border-color 0.3s; }
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-light); }
.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.form-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-mid); cursor: pointer; }
.form-check input { accent-color: var(--accent); }
.form-link { font-size: 0.82rem; color: var(--accent); text-decoration: none; }
.btn-full { width: 100%; padding: 0.85rem; background: var(--accent); color: #fff; border: none; border-radius: 100px; font-size: 0.95rem; font-weight: 500; cursor: pointer; font-family: var(--sans); transition: all 0.2s; }
.btn-full:hover { box-shadow: 0 8px 30px rgba(196,98,58,0.25); transform: translateY(-1px); }
.login-footer { text-align: center; margin-top: 1.8rem; font-size: 0.85rem; color: var(--text-light); }
.login-footer a { color: var(--accent); text-decoration: none; font-weight: 500; }

/* Affiliate & Support (batch2/batch3) */
.page-subtitle { color: var(--text-light); font-size: 0.92rem; margin-bottom: 2.5rem; }
.btn-sm { display: inline-block; padding: 0.45rem 1.2rem; border-radius: 100px; font-size: 0.8rem; font-weight: 500; border: none; cursor: pointer; font-family: var(--sans); text-decoration: none; transition: all 0.2s; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(196,98,58,0.25); }
.btn-outline { background: transparent; color: var(--text-mid); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text-mid); color: var(--text); }

.affiliate-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.affiliate-actions { display: flex; gap: 0.6rem; }

.table-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(26,23,20,0.03); }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table thead th { text-align: left; padding: 0.9rem 1.2rem; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); background: var(--bg-warm); border-bottom: 1px solid var(--border); }
table.data-table tbody td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; color: var(--text-mid); word-break: break-all; }
table.data-table tbody tr:last-child td { border-bottom: none; }
.data-table__url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; }

.empty-state { text-align: center; padding: 3rem 2rem; color: var(--text-light); }
.empty-state p { font-size: 0.9rem; }
.empty-state .sub-text { font-size: 0.82rem; margin-top: 0.4rem; }

.form-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2rem; max-width: 520px; box-shadow: 0 4px 20px rgba(26,23,20,0.03); }

.stats-filter { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; margin-bottom: 2rem; box-shadow: 0 4px 20px rgba(26,23,20,0.03); }
.stats-filter__form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; align-items: end; }
.stats-filter__form .form-group { margin-bottom: 0; }
.stats-filter__submit .btn-sm { width: 100%; padding: 0.65rem; }

.stats-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.stats-totals__item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.4rem 1.6rem; box-shadow: 0 4px 20px rgba(26,23,20,0.03); }
.stats-totals__label { display: block; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); margin-bottom: 0.4rem; }
.stats-totals__value { font-family: var(--serif); font-size: 1.6rem; color: var(--text); }

.support-intro { color: var(--text-mid); font-size: 0.95rem; line-height: 1.7; margin-bottom: 2rem; max-width: 600px; }
.messages-area { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem 1.6rem; margin-bottom: 1.5rem; min-height: 180px; box-shadow: 0 4px 20px rgba(26,23,20,0.03); }
.messages-area--empty { display: flex; align-items: center; justify-content: center; padding: 2.5rem 2rem; }
.empty-messages { text-align: center; color: var(--text-light); }
.empty-messages p { font-size: 0.9rem; }
.empty-messages .sub-text { font-size: 0.82rem; margin-top: 0.3rem; }
.form-textarea { width: 100%; padding: 0.75rem 1rem; background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-size: 0.92rem; font-family: var(--sans); outline: none; transition: border-color 0.3s; resize: vertical; min-height: 120px; }
.form-textarea:focus { border-color: var(--accent); }
.form-textarea::placeholder { color: var(--text-light); }

.messages-area { display: flex; flex-direction: column; gap: 1.1rem; }
.messages-area--empty { display: flex; align-items: center; justify-content: center; }
.support-chat__message { display: flex; flex-direction: column; max-width: 75%; }
.support-chat__message--own { align-self: flex-end; align-items: flex-end; }
.support-chat__message--admin { align-self: flex-start; align-items: flex-start; }
.support-chat__meta { display: flex; gap: 0.6rem; font-size: 0.72rem; color: var(--text-light); margin-bottom: 0.35rem; padding: 0 0.25rem; }
.support-chat__author { color: var(--text-mid); font-weight: 500; }
.support-chat__date { color: var(--text-light); }
.support-chat__bubble { padding: 0.75rem 1rem; border-radius: 14px; font-size: 0.92rem; line-height: 1.55; border: 1px solid var(--border); box-shadow: 0 2px 8px rgba(26,23,20,0.04); }
.support-chat__message--own .support-chat__bubble { background: var(--accent); color: #fff; border-color: var(--accent); border-bottom-right-radius: 4px; }
.support-chat__message--admin .support-chat__bubble { background: var(--bg-warm); color: var(--text); border-bottom-left-radius: 4px; }
@media (max-width: 600px) { .support-chat__message { max-width: 90%; } }

@media (max-width: 768px) {
  .stats-filter__form { grid-template-columns: 1fr; }
  .stats-totals { grid-template-columns: 1fr; }
  .affiliate-header { align-items: flex-start; }
}

.form-textarea + .btn-full { margin-top: 1.5rem; }

.btn-icon { display: inline-flex; align-items: center; justify-content: center; padding: 0.45rem; width: 2rem; height: 2rem; white-space: nowrap; }
.btn-icon .icon { width: 1rem; height: 1rem; display: block; }
.btn-icon .icon-check { display: none; }
.btn-icon.is-copied { color: var(--accent); border-color: var(--accent); }
.btn-icon.is-copied .icon-copy { display: none; }
.btn-icon.is-copied .icon-check { display: block; }

.page-container--narrow { max-width: 560px; }
.page-container--wide { max-width: 1180px; }
.back-link { display: inline-block; font-size: 0.82rem; text-decoration: none; margin-bottom: 1.2rem; }
.form-hint { font-size: 0.8rem; margin-top: 0.5rem; }
.back-link { color: var(--text-mid); }
.back-link:hover { color: var(--accent); }
.form-hint { color: var(--text-light); }

.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.profile-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 2.2rem 2rem; box-shadow: 0 4px 20px rgba(26,23,20,0.03); }
.profile-card h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; margin-bottom: 0.5rem; }
.status-row { margin: 1rem 0 0.8rem; }
.status-badge { display: inline-block; padding: 0.3em 1em; border-radius: 100px; font-size: 0.78rem; font-weight: 500; }
.status-free { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(196,98,58,0.15); }
.status-premium { background: var(--accent-soft); color: var(--accent); border: 1px solid rgba(196,98,58,0.25); }
.status-description { color: var(--text-mid); font-size: 0.9rem; margin: 1rem 0 1.5rem; line-height: 1.65; }
.status-description strong { color: var(--text); font-weight: 500; }
.status-note { color: var(--text-light); font-size: 0.85rem; margin-top: 0.8rem; }
.plan-features { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.plan-features li { font-size: 0.88rem; color: var(--text-mid); padding: 0.4rem 0; padding-left: 1.4rem; position: relative; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 600; }
.confirm-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }

.nav-links a.btn-nav { color: #fff; font-weight: 500; }
.nav-links a.btn-nav:hover { color: #fff; }
.nav-greeting { font-size: 0.85rem; color: var(--text-mid); }
.nav-greeting strong { color: var(--accent); font-weight: 500; }

/* Campaign list (admin-mockup2) */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.2rem; gap: 1rem; flex-wrap: wrap; }
.campaigns-table { width: 100%; border-collapse: collapse; }
.campaigns-table thead th { text-align: left; padding: 0.9rem 1.2rem; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); background: var(--bg-warm); border-bottom: 1px solid var(--border); }
.campaigns-table thead th.num { text-align: right; }
.campaigns-table tbody td { padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; vertical-align: middle; color: var(--text); }
.campaigns-table tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.campaigns-table tbody td.dim { color: var(--text-light); }
.campaigns-table tbody tr:last-child td { border-bottom: none; }
.campaigns-table tbody tr { transition: background 0.2s; }
.campaigns-table tbody tr:hover { background: var(--bg-warm); }
.campaigns-table tr.is-archived td { opacity: 0.55; }
.campaign-name { color: var(--accent); font-weight: 500; text-decoration: none; transition: opacity 0.2s; }
.campaign-name:hover { opacity: 0.8; }
.archived-tag { display: inline-block; margin-left: 0.5rem; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-light); }

/* Campaign detail (admin-mockup2) */
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 0.6rem; gap: 1rem; flex-wrap: wrap; }
.detail-title { font-family: var(--serif); font-size: 2rem; font-weight: 400; }
.detail-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.campaign-url-bar { display: flex; align-items: center; gap: 0.8rem; padding: 0.75rem 1rem; background: var(--bg-warm); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 1.5rem; }
.campaign-url-bar code { font-size: 0.82rem; color: var(--text-mid); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.section-divider { width: 100%; height: 1px; background: var(--border); margin: 1.5rem 0; }
.detail-section { padding: 1.5rem 0; }
.detail-section-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; margin-bottom: 1rem; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.2rem; margin-bottom: 1.5rem; }
.settings-grid .form-group { margin-bottom: 0; }

.btn-danger { background: rgba(217,68,68,0.08); color: #d94444; border: 1px solid rgba(217,68,68,0.18); }
.btn-danger:hover { background: rgba(217,68,68,0.18); border-color: rgba(217,68,68,0.35); color: #d94444; }

.rule-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 1.8rem; margin-bottom: 1.5rem; box-shadow: 0 4px 20px rgba(26,23,20,0.03); }
.rule-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.rule-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; margin-bottom: 0.2rem; }
.rule-sub { font-size: 0.85rem; color: var(--text-light); }
.rule-group { margin-bottom: 1.6rem; }
.rule-group:last-child { margin-bottom: 0; }
.rule-group-label { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); margin-bottom: 0.7rem; }

.rules-table { width: 100%; border-collapse: collapse; }
.rules-table thead th { text-align: left; padding: 0.5rem 0.6rem 0.6rem; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-light); }
.rules-table thead th.col-num { text-align: right; }
.rules-table tbody td { padding: 0.35rem 0.6rem; vertical-align: middle; font-size: 0.88rem; color: var(--text); }
.rules-table tbody td.dim { color: var(--text-light); }
.rules-table tbody td.col-num { text-align: right; font-variant-numeric: tabular-nums; }
.rules-table tbody td.col-action { width: 36px; text-align: center; }
.rules-table .col-weight { width: 110px; }
.rules-table .col-num { width: 110px; }
.rules-table tr.is-disabled td { opacity: 0.55; }
.rules-table .rule-add-row td { border-top: 1px dashed var(--border); padding-top: 0.7rem; }
.rules-table .rule-add-row .dim { color: var(--text-light); font-size: 0.8rem; }
.rules-table input.form-input { padding: 0.45rem 0.65rem; font-size: 0.85rem; }

.row-delete { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; color: var(--text-light); border-radius: 6px; transition: all 0.2s; }
.row-delete:hover { color: #d94444; background: rgba(217,68,68,0.1); }
.row-delete svg { width: 14px; height: 14px; }

.rule-row { display: grid; grid-template-columns: 1fr 120px 36px; gap: 0.6rem; align-items: center; }

.add-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--accent-soft); border: 1px solid rgba(196,98,58,0.15); border-radius: 8px; cursor: pointer; transition: all 0.2s; color: var(--accent); font-size: 1.2rem; line-height: 1; padding: 0; font-family: var(--sans); }
.add-btn:hover { background: rgba(196,98,58,0.16); border-color: rgba(196,98,58,0.3); }

.rule-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.5rem; }

.upgrade-card { background: var(--bg-warm); border: 1px solid var(--border); border-radius: 16px; padding: 1.8rem; margin-top: 2rem; }
.upgrade-card h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 400; margin-bottom: 0.4rem; }
.upgrade-card p { color: var(--text-mid); font-size: 0.9rem; margin-bottom: 1rem; }

/* select2 overrides — terracotta */
.select2-container--default .select2-selection--multiple { background: #fff; border: 1px solid var(--border); border-radius: 10px; min-height: 42px; padding: 0.25rem 0.4rem; }
.select2-container--default.select2-container--focus .select2-selection--multiple { border-color: var(--accent); }
.select2-container--default .select2-selection--multiple .select2-selection__choice { background: var(--accent-soft); border: 1px solid rgba(196,98,58,0.2); color: var(--text); border-radius: 100px; padding: 2px 10px; margin-top: 4px; font-size: 0.82rem; }
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove { color: var(--text-light); margin-right: 5px; }
.select2-container--default .select2-search--inline .select2-search__field { color: var(--text); font-family: var(--sans); }
.select2-dropdown { background: var(--bg-card); border: 1px solid var(--border); color: var(--text); border-radius: 10px; }
.select2-results__option { padding: 0.5rem 0.8rem; font-size: 0.88rem; color: var(--text); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--accent-soft); color: var(--text); }
.select2-search--dropdown .select2-search__field { background: #fff; border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 0.4rem 0.6rem; }

@media (max-width: 768px) {
  .settings-grid { grid-template-columns: 1fr; }
  .detail-actions { width: 100%; }
}
