/* ═══════════════════════════════════════════════════════════
   DiCard — Shared Stylesheet
   bcard.dicard.site
   ═══════════════════════════════════════════════════════════ */

:root {
  --navy:        #001f3f;
  --navy-light:  #002a54;
  --navy-mid:    #003366;
  --green:       #1a9e3f;
  --green-light: #22c55e;
  --green-dark:  #15803d;
  --white:       #ffffff;
  --g50:         #f8fafc;
  --g100:        #f1f5f9;
  --g200:        #e2e8f0;
  --g300:        #cbd5e1;
  --g400:        #94a3b8;
  --g500:        #64748b;
  --g600:        #475569;
  --g700:        #334155;
  --danger:      #ef4444;
  --warning:     #f59e0b;
  --info:        #3b82f6;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--navy) !important; scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--navy) !important;
  color: var(--white);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3 { font-family: 'Playfair Display', serif; }
input, textarea, select, button { font-family: 'Inter', sans-serif; }

/* ── NAV ── */
.nav {
  background: rgba(0,31,63,0.97);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo img { height: 32px; object-fit: contain; }
.nav-logo-text { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--white); }
.nav-logo-text span { color: var(--green-light); }
.nav-sub { font-size: 11px; color: var(--g500); letter-spacing: 0.05em; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-btn {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--g400);
  transition: all 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-btn:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-btn.active { background: var(--green); color: var(--white); }
.nav-btn.outline { border: 1px solid rgba(255,255,255,0.15); color: var(--white); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.2s; text-decoration: none;
}
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.15); }
.btn-secondary:hover { background: rgba(255,255,255,0.06); }
.btn-danger { background: rgba(239,68,68,0.15); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 7px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── FORMS ── */
.form-section {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 14px;
}
.sec-label {
  font-size: 11px; font-weight: 800; color: var(--green-light);
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: 16px; display: flex; align-items: center; gap: 7px;
}
.field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 160px; }
.field.full { flex: 1 1 100%; }
.field label {
  font-size: 10px; font-weight: 700; color: var(--g400);
  letter-spacing: 0.07em; text-transform: uppercase;
}
.field input, .field textarea, .field select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 10px 13px;
  color: var(--white); font-size: 13px;
  outline: none; transition: border 0.2s; width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); }
.field input::placeholder, .field textarea::placeholder { color: var(--g600); }
.field select option { background: var(--navy); }
.field textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.optional { font-size: 9px; color: var(--g600); font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.char-count { font-size: 10px; color: var(--g500); text-align: right; margin-top: 3px; }
.char-count.warn { color: var(--warning); }

/* ── CARDS / SECTIONS ── */
.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px; padding: 22px; margin-bottom: 18px;
}
.card-title {
  font-size: 14px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-trial   { background: rgba(245,158,11,0.15);  color: var(--warning); }
.badge-active  { background: rgba(26,158,63,0.15);   color: var(--green-light); }
.badge-unpaid  { background: rgba(239,68,68,0.15);   color: var(--danger); }
.badge-expired { background: rgba(100,116,139,0.15); color: var(--g400); }
.badge-info    { background: rgba(59,130,246,0.15);  color: #93c5fd; }

/* ── DIVIDER ── */
.divider { height: 1px; background: rgba(255,255,255,0.06); margin: 16px 0; }

/* ── PROGRESS BAR ── */
.progress-wrap { display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 5px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; }
.progress-fill  { height: 100%; background: var(--green); border-radius: 3px; transition: width 0.4s; }
.progress-label { font-size: 11px; color: var(--g400); white-space: nowrap; }

/* ── MODAL ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  display: none; align-items: center; justify-content: center;
  z-index: 300; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--navy-light); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px; padding: 28px; width: 100%;
  max-width: 560px; max-height: 90vh; overflow-y: auto;
}
.modal-hdr { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 17px; font-weight: 800; font-family: 'Playfair Display', serif; }
.modal-close { background: none; border: none; color: var(--g400); cursor: pointer; font-size: 22px; line-height: 1; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  padding: 13px 20px; border-radius: 10px;
  font-size: 13px; font-weight: 700; color: var(--white);
  z-index: 400; opacity: 0; display: none;
  transition: opacity 0.3s;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  max-width: 340px;
}
.toast.green { background: rgba(26,158,63,0.95); }
.toast.red   { background: rgba(239,68,68,0.95); }
.toast.show  { opacity: 1; display: block; }

/* ── TABLES ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 10px; font-weight: 800; color: var(--g500);
  text-transform: uppercase; letter-spacing: 0.07em;
  padding: 10px 14px; text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.data-table th:hover { color: var(--white); }
.data-table td { padding: 13px 14px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .sub-name { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.data-table .sub-slug { font-size: 11px; color: var(--green-light); }
.data-table .sub-email { font-size: 11px; color: var(--g500); }

/* ── SLUGS / URLS ── */
.slug-wrap { position: relative; }
.slug-prefix { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--g500); pointer-events: none; }
.slug-input  { padding-left: 118px !important; }
.slug-status { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; font-weight: 700; }
.slug-ok  { color: var(--green-light); }
.slug-err { color: var(--danger); }
.slug-desc {
  background: rgba(26,158,63,0.07); border: 1px solid rgba(26,158,63,0.15);
  border-radius: 8px; padding: 12px 14px; font-size: 12px;
  color: var(--g300); line-height: 1.7; margin-bottom: 12px;
}

/* ── PHOTO UPLOADS ── */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.photo-upload { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.photo-circle {
  width: 80px; height: 80px; border-radius: 50%;
  border: 2px dashed rgba(26,158,63,0.4); background: rgba(26,158,63,0.06);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; transition: all 0.2s; font-size: 24px;
}
.photo-circle:hover { border-color: var(--green); background: rgba(26,158,63,0.12); }
.photo-circle img { width: 100%; height: 100%; object-fit: cover; }
.photo-rect {
  width: 100px; height: 56px; border-radius: 8px;
  border: 2px dashed rgba(26,158,63,0.4); background: rgba(26,158,63,0.06);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; transition: all 0.2s; font-size: 24px;
}
.photo-rect:hover { border-color: var(--green); background: rgba(26,158,63,0.12); }
.photo-rect img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.photo-lbl { font-size: 12px; color: var(--g300); font-weight: 600; text-align: center; }
.photo-sub { font-size: 10px; color: var(--g600); text-align: center; }

/* ── SOCIAL GRID ── */
.social-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-item label { font-size: 10px; font-weight: 700; color: var(--g400); letter-spacing: 0.07em; text-transform: uppercase; display: flex; align-items: center; gap: 5px; margin-bottom: 5px; }
.social-item input {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px; padding: 8px 11px; color: var(--white);
  font-size: 12px; outline: none; transition: all 0.2s; width: 100%;
}
.social-item input:focus { border-color: var(--green); }
.social-item input::placeholder { color: var(--g600); }
.social-item input.over-limit { border-color: var(--danger); background: rgba(239,68,68,0.08); }
.social-counter { font-size: 11px; padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; font-weight: 600; }
.social-counter.ok { background: rgba(26,158,63,0.1); color: var(--green-light); }
.social-counter.warn { background: rgba(239,68,68,0.1); color: var(--danger); }

/* ── TEMPLATE PICKER ── */
.tpl-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.tpl-card { border-radius: 10px; overflow: hidden; cursor: pointer; border: 2px solid transparent; transition: all 0.2s; }
.tpl-card.selected { border-color: var(--green); }
.tpl-preview { height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.tpl-name { font-size: 11px; font-weight: 700; text-align: center; padding: 6px 4px 8px; }
.color-dots { display: flex; gap: 5px; justify-content: center; margin-top: 5px; }
.cdot { width: 13px; height: 13px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; }
.cdot.selected { border-color: var(--white); transform: scale(1.2); }

/* ── TRIAL BANNER ── */
.trial-banner {
  background: rgba(26,158,63,0.1); border: 1px solid rgba(26,158,63,0.22);
  border-radius: 12px; padding: 16px 20px;
  display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px;
}
.trial-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.trial-title { font-size: 14px; font-weight: 700; color: var(--green-light); margin-bottom: 3px; }
.trial-desc { font-size: 12px; color: var(--g400); line-height: 1.6; }

/* ── QR CODE ── */
.qr-box { background: var(--white); padding: 10px; border-radius: 10px; display: inline-block; }

/* ── ANALYTICS CARDS ── */
.analytics-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.an-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 14px 16px; }
.an-lbl { font-size: 10px; color: var(--g500); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; margin-bottom: 5px; }
.an-val { font-size: 22px; font-weight: 800; }
.an-sub { font-size: 11px; color: var(--g500); margin-top: 2px; }

/* ── REFERRAL ── */
.referral-code-box {
  background: rgba(26,158,63,0.1); border: 1px dashed rgba(26,158,63,0.4);
  border-radius: 10px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.referral-code { font-size: 22px; font-weight: 800; letter-spacing: 0.1em; color: var(--green-light); font-family: 'Courier New', monospace; }
.referral-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── PRICING CARDS ── */
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pricing-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 22px; cursor: pointer; transition: all 0.2s;
}
.pricing-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.2); }
.pricing-card.featured { border-color: var(--green); background: rgba(26,158,63,0.08); }
.pricing-badge { font-size: 10px; font-weight: 800; background: var(--green); color: var(--white); padding: 3px 8px; border-radius: 10px; display: inline-block; margin-bottom: 8px; }
.pricing-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.pricing-old { font-size: 13px; color: var(--g500); text-decoration: line-through; font-weight: 600; margin-bottom: 2px; }
.pricing-price { font-size: 28px; font-weight: 800; color: var(--green-light); }
.pricing-price span { font-size: 13px; color: var(--g400); font-weight: 400; }
.pricing-offer { font-size: 11px; font-weight: 800; color: var(--warning); background: rgba(245,158,11,0.12); border-radius: 6px; padding: 3px 8px; display: inline-block; margin: 6px 0; }
.pricing-feat { font-size: 12px; color: var(--g400); line-height: 1.8; margin-top: 10px; list-style: none; }
.pricing-feat li::before { content: "✓ "; color: var(--green-light); font-weight: 700; }
.pricing-cta { margin-top: 14px; text-align: center; font-size: 12px; font-weight: 700; color: var(--green-light); border-top: 1px solid rgba(255,255,255,0.07); padding-top: 12px; }

/* ── STAT GRID ── */
.stat-grid { display: grid; gap: 14px; margin-bottom: 24px; }
.stat-grid-4 { grid-template-columns: repeat(4,1fr); }
.stat-grid-6 { grid-template-columns: repeat(6,1fr); }
.stat-card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 16px 18px; }
.stat-lbl { font-size: 10px; color: var(--g500); font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 7px; }
.stat-val { font-size: 26px; font-weight: 800; }
.stat-sub { font-size: 11px; color: var(--g500); margin-top: 3px; }

/* ── LOCKED FEATURE ── */
.locked { position: relative; opacity: 0.5; pointer-events: none; }
.lock-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  background: rgba(0,31,63,0.9); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 8px 14px; font-size: 12px; font-weight: 700;
  color: var(--g400); white-space: nowrap; pointer-events: all;
  cursor: pointer; opacity: 1;
}

/* ── SUCCESS BOX ── */
.success-wrap { max-width: 540px; margin: 56px auto; padding: 0 28px; text-align: center; }
.success-icon { font-size: 56px; margin-bottom: 14px; }
.url-box {
  background: rgba(26,158,63,0.1); border: 1px solid rgba(26,158,63,0.22);
  border-radius: 10px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
}
.url-text { font-size: 15px; font-weight: 700; color: var(--green-light); }
.copy-btn { background: transparent; border: 1px solid rgba(26,158,63,0.3); border-radius: 6px; padding: 5px 12px; font-size: 11px; color: var(--green-light); cursor: pointer; font-weight: 700; }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.fbtn { padding: 6px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,0.1); background: transparent; color: var(--g400); cursor: pointer; transition: all 0.2s; }
.fbtn.active { background: var(--navy-mid); color: var(--white); border-color: rgba(255,255,255,0.2); }
.sort-sel { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 6px 12px; color: var(--white); font-size: 12px; outline: none; cursor: pointer; }
.sort-sel option { background: var(--navy); }
.search-box { margin-left: auto; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; padding: 7px 13px; color: var(--white); font-size: 13px; outline: none; width: 220px; }
.search-box:focus { border-color: var(--green); }
.search-box::placeholder { color: var(--g600); }

/* ── EXPIRY COLORS ── */
.expiry-ok     { color: var(--green-light); font-weight: 700; }
.expiry-warn   { color: var(--warning);     font-weight: 700; }
.expiry-danger { color: var(--danger);      font-weight: 700; }

/* ── ACTION BTNS ── */
.action-btns { display: flex; gap: 5px; flex-wrap: wrap; }
.abtn { padding: 4px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; border: none; cursor: pointer; transition: all 0.2s; }
.abtn-view   { background: rgba(59,130,246,0.15);  color: #93c5fd; }
.abtn-remind { background: rgba(245,158,11,0.15);  color: var(--warning); }
.abtn-paid   { background: rgba(26,158,63,0.15);   color: var(--green-light); }
.abtn-del    { background: rgba(239,68,68,0.15);   color: #fca5a5; }

/* ── PHONE ROW ── */
.phone-row { display: flex; gap: 8px; }
.phone-code { width: 80px !important; flex: 0 0 80px !important; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav { padding: 0 16px; height: 56px; }
  .nav-sub { display: none; }
  .stat-grid-4 { grid-template-columns: repeat(2,1fr); }
  .stat-grid-6 { grid-template-columns: repeat(3,1fr); }
  .analytics-grid { grid-template-columns: repeat(2,1fr); }
  .pricing-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .social-grid { grid-template-columns: 1fr; }
  .filter-bar { gap: 6px; }
  .search-box { width: 100%; margin-left: 0; }
  .sort-sel { width: 100%; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table tr { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; margin-bottom: 10px; padding: 14px; }
  .data-table td { padding: 4px 0; border: none; }
  .data-table td::before { content: attr(data-label); font-size: 10px; font-weight: 800; color: var(--g500); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 2px; }
}
@media (max-width: 480px) {
  .stat-grid-6 { grid-template-columns: repeat(2,1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .tpl-grid { grid-template-columns: 1fr; }
  .modal { padding: 18px; }
}
