/* ═══════════════════════════════════════════════════════════
   DiCard card styles (assets/card.css)
   One stylesheet for the live preview, the template picker and
   every published card page. Templates: .t-1 … .t-10
   Accent comes in as --ac (with --ac-ink for text and --ac-on
   for text on an accent button), worked out by card.js / card_render.php
   so the text always stays readable.
   ═══════════════════════════════════════════════════════════ */

.dcc {
  --ac:#22c55e; --ac-ink:#22c55e; --ac-on:#04210f;
  --bg:#002a54; --tc:#ffffff; --sc:#c9d7e5; --line:rgba(255,255,255,.12);
  --soft:rgba(255,255,255,.06); --shadow:0 30px 60px -24px rgba(0,0,0,.6);
  position:relative; isolation:isolate; overflow:hidden;
  width:100%; border-radius:24px; background:var(--bg); color:var(--tc);
  font-family:"Readex Pro", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size:14px; line-height:1.5; text-align:start;
  box-shadow:var(--shadow);
  -webkit-font-smoothing:antialiased;
}
.dcc *, .dcc *::before, .dcc *::after { box-sizing:border-box; margin:0; padding:0; }
.dcc a { color:inherit; text-decoration:none; }
.dcc img { display:block; max-width:100%; }
.dcc-fx { position:absolute; inset:0; z-index:-1; pointer-events:none; overflow:hidden; border-radius:inherit; }
.dcc-in { position:relative; padding:26px 24px 20px; }

/* profile */
.dcc-top { display:flex; align-items:center; gap:16px; }
.dcc-avatar { width:76px; height:76px; border-radius:50%; object-fit:cover; flex:none;
  border:3px solid var(--ac); box-shadow:0 0 0 4px color-mix(in srgb, var(--ac) 18%, transparent); background:#fff; }
.dcc-name { font-size:24px; font-weight:600; line-height:1.18; letter-spacing:-.01em; color:var(--tc); overflow-wrap:anywhere; }
.dcc-role { margin-top:5px; font-size:14.5px; font-weight:600; color:var(--ac-ink); }

/* company */
.dcc-co { display:flex; align-items:center; gap:12px; margin-top:18px; }
.dcc-logo { flex:none; height:52px; max-width:96px; width:auto; object-fit:contain; background:#fff; border-radius:12px; padding:6px;
  box-shadow:0 4px 14px -6px rgba(0,0,0,.35); }
.dcc-coname { font-size:15.5px; font-weight:600; color:var(--tc); }
.dcc-cobio { font-size:13px; color:var(--sc); margin-top:2px; }

.dcc-div { height:1px; margin:18px 0 14px; background:linear-gradient(90deg, color-mix(in srgb, var(--ac) 70%, transparent), var(--line) 40%, transparent); }
[dir="rtl"] .dcc-div, .dcc[dir="rtl"] .dcc-div { background:linear-gradient(-90deg, color-mix(in srgb, var(--ac) 70%, transparent), var(--line) 40%, transparent); }

/* contact rows */
.dcc-rows { display:grid; gap:8px; }
.dcc-row { display:flex; align-items:center; gap:11px; font-size:14px; color:var(--tc); min-width:0; }
.dcc-row span:last-child { overflow-wrap:anywhere; min-width:0; }
a.dcc-row:hover span:last-child { text-decoration:underline; text-underline-offset:3px; }
.dcc-ic { flex:none; width:32px; height:32px; border-radius:10px; display:grid; place-items:center;
  background:color-mix(in srgb, var(--ac) 16%, transparent); color:var(--ac-ink); }
.dcc-ic svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }

.dcc-bio { margin-top:14px; font-size:13.5px; line-height:1.65; color:var(--sc); padding:11px 14px; border-radius:12px;
  background:var(--soft); border-inline-start:3px solid var(--ac); }

.dcc-soc { display:flex; flex-wrap:wrap; gap:7px; margin-top:14px; }
.dcc .dcc-soc a { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:600; padding:7px 12px; border-radius:999px;
  color:var(--ac-ink); background:color-mix(in srgb, var(--ac) 14%, transparent); border:1px solid color-mix(in srgb, var(--ac) 30%, transparent);
  transition:transform .2s, background .2s; }
.dcc .dcc-soc a:hover { transform:translateY(-2px); background:color-mix(in srgb, var(--ac) 24%, transparent); }
.dcc-soc svg { width:13px; height:13px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.dcc .dcc-save { position:relative; overflow:hidden; display:flex; align-items:center; justify-content:center; gap:9px; margin-top:18px;
  padding:14px; border-radius:14px; background:var(--ac); color:var(--ac-on); font-size:15.5px; font-weight:600;
  box-shadow:0 12px 26px -12px color-mix(in srgb, var(--ac) 80%, transparent); transition:transform .2s, filter .2s; }
.dcc .dcc-save:hover { transform:translateY(-2px); filter:brightness(1.06); }
.dcc-save svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2.1; stroke-linecap:round; stroke-linejoin:round; }
.dcc-save::after { content:""; position:absolute; top:0; bottom:0; width:40%; left:-60%;
  background:linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); animation:dcc-shine 4.5s ease-in-out infinite; }
@keyframes dcc-shine { 0%,60% { left:-60%; } 85%,100% { left:130%; } }

.dcc-foot { margin-top:16px; padding-top:12px; border-top:1px solid var(--line); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.dcc-foot small { font-size:11.5px; color:var(--sc); }
.dcc-brand { display:flex; align-items:center; }
.dcc-brand img { height:19px; width:auto; }
.dcc-brand .on-l { display:none; }
.dcc.tone-l .dcc-brand .on-d { display:none; }
.dcc.tone-l .dcc-brand .on-l { display:block; }

/* light tone defaults */
.dcc.tone-l { --tc:#0f172a; --sc:#475569; --line:rgba(15,23,42,.1); --soft:rgba(15,23,42,.04); --shadow:0 30px 60px -28px rgba(0,20,50,.45); }

/* ── layouts ─────────────────────────────────────── */
.dcc.l-center .dcc-top { flex-direction:column; text-align:center; gap:12px; }
.dcc.l-center .dcc-avatar { width:96px; height:96px; }
.dcc.l-center .dcc-co { justify-content:center; text-align:start; }
.dcc.l-center .dcc-soc { justify-content:center; }
.dcc.l-center .dcc-div { background:linear-gradient(90deg, transparent, color-mix(in srgb, var(--ac) 70%, transparent), transparent); }

.dcc-cover { display:none; }
.dcc.l-banner .dcc-cover { display:block; height:112px; margin:-26px -24px 0; position:relative;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.32) 1.2px, transparent 1.4px) 0 0/14px 14px,
    linear-gradient(135deg, var(--ac), color-mix(in srgb, var(--ac) 55%, #001f3f)); }
.dcc.l-banner .dcc-cover::after { content:""; position:absolute; inset:auto 0 0 0; height:40px; background:linear-gradient(transparent, rgba(0,0,0,.12)); }
.dcc.l-banner .dcc-top { flex-direction:column; text-align:center; gap:10px; margin-top:-52px; position:relative; }
.dcc.l-banner .dcc-avatar { width:104px; height:104px; border:5px solid #fff; box-shadow:0 10px 24px -10px rgba(0,0,0,.45); }
.dcc.l-banner .dcc-noavatar { height:58px; }
.dcc.l-banner .dcc-co { justify-content:center; }
.dcc.l-banner .dcc-soc { justify-content:center; }

/* ── 1 Classic ───────────────────────────────────── */
.dcc.t-1 { --bg:linear-gradient(160deg, #063a6e 0%, #002a54 45%, #001a36 100%); }
.dcc.t-1 .dcc-name { font-family:"Playfair Display", Georgia, serif; font-weight:700; font-size:25px; }
.dcc.t-1 .dcc-fx::before { content:""; position:absolute; inset:0;
  background-image:linear-gradient(rgba(160,200,235,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(160,200,235,.07) 1px, transparent 1px);
  background-size:22px 22px; mask-image:linear-gradient(160deg, #000, transparent 70%); -webkit-mask-image:linear-gradient(160deg, #000, transparent 70%); }
.dcc.t-1 .dcc-fx::after { content:""; position:absolute; width:220px; height:220px; top:-90px; inset-inline-end:-80px; border-radius:50%;
  background:radial-gradient(color-mix(in srgb, var(--ac) 40%, transparent), transparent 65%); }

/* ── 2 Light ─────────────────────────────────────── */
.dcc.t-2 { --bg:#ffffff; border:1px solid rgba(15,23,42,.08); }
.dcc.t-2 .dcc-fx::before { content:""; position:absolute; inset:0 0 auto 0; height:5px; background:linear-gradient(90deg, var(--ac), color-mix(in srgb, var(--ac) 30%, #4da3ff)); }
.dcc.t-2 .dcc-fx::after { content:""; position:absolute; width:200px; height:200px; top:-100px; inset-inline-end:-70px; border-radius:50%;
  background:radial-gradient(color-mix(in srgb, var(--ac) 22%, transparent), transparent 68%); }

/* ── 3 Bold ──────────────────────────────────────── */
.dcc.t-3 { --bg:#0a0a0b; --sc:#c2c2c8; }
.dcc.t-3 .dcc-name { font-size:28px; font-weight:700; letter-spacing:-.02em; }
.dcc.t-3 .dcc-fx::before { content:""; position:absolute; top:0; bottom:0; inset-inline-start:0; width:6px; background:var(--ac); }
.dcc.t-3 .dcc-fx::after { content:""; position:absolute; inset:0;
  background:repeating-linear-gradient(135deg, rgba(255,255,255,.025) 0 2px, transparent 2px 12px); }
.dcc.t-3 .dcc-row .dcc-ic { border-radius:50%; }

/* ── 4 Glass ─────────────────────────────────────── */
.dcc.t-4 { --bg:#0b1730; --sc:#d5e2ef; --line:rgba(255,255,255,.18); --soft:rgba(255,255,255,.08); }
.dcc.t-4 .dcc-fx i { position:absolute; border-radius:50%; filter:blur(36px); opacity:.85; animation:dcc-drift 14s ease-in-out infinite alternate; }
.dcc.t-4 .dcc-fx i:nth-child(1) { width:62%; aspect-ratio:1; top:-14%; inset-inline-start:-14%; background:var(--ac); }
.dcc.t-4 .dcc-fx i:nth-child(2) { width:56%; aspect-ratio:1; bottom:-12%; inset-inline-end:-14%; background:#4da3ff; animation-delay:-5s; }
.dcc.t-4 .dcc-fx i:nth-child(3) { width:40%; aspect-ratio:1; top:38%; inset-inline-start:40%; background:#ffc229; opacity:.45; animation-delay:-9s; }
.dcc.t-4 .dcc-in { margin:14px; padding:24px 20px 18px; border-radius:20px;
  background:linear-gradient(150deg, rgba(255,255,255,.17), rgba(255,255,255,.06));
  border:1px solid rgba(255,255,255,.26); box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 20px 40px -20px rgba(0,0,0,.5);
  backdrop-filter:blur(18px) saturate(140%); -webkit-backdrop-filter:blur(18px) saturate(140%); }
.dcc.t-4 .dcc-ic { background:rgba(255,255,255,.14); color:#fff; }
.dcc.t-4 .dcc-soc a { color:#fff; background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.24); }
.dcc.t-4 .dcc-role { color:#fff; opacity:.92; }
@keyframes dcc-drift { to { transform:translate(10%, 8%) scale(1.12); } }

/* ── 5 Paper ─────────────────────────────────────── */
.dcc.t-5 { --bg:#f5efe2; --tc:#2b2219; --sc:#5c5045; --line:rgba(60,40,20,.14); --soft:rgba(60,40,20,.05);
  --shadow:0 2px 0 #e6dcc8, 0 26px 50px -26px rgba(40,25,10,.55); }
.dcc.t-5 .dcc-fx::before { content:""; position:absolute; inset:0; opacity:.55; mix-blend-mode:multiply;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .25 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.dcc.t-5 .dcc-fx::after { content:""; position:absolute; inset:10px; border:1px solid rgba(60,40,20,.18); border-radius:16px; }
.dcc.t-5 .dcc-name { font-family:"Playfair Display", Georgia, serif; font-weight:700; font-size:26px; text-shadow:0 1px 0 rgba(255,255,255,.7); }
.dcc.t-5 .dcc-avatar { box-shadow:0 0 0 4px #fff, 0 6px 16px -6px rgba(40,25,10,.5); border-width:2px; }
.dcc.t-5 .dcc-save { box-shadow:inset 0 -2px 0 rgba(0,0,0,.18), 0 10px 20px -12px rgba(40,25,10,.6); }

/* ── 6 Gloss (plastic) ───────────────────────────── */
.dcc.t-6 { --bg:linear-gradient(140deg, color-mix(in srgb, var(--ac) 78%, #000) 0%, #0d1424 62%, #070b14 100%); --sc:#dbe4ee; --line:rgba(255,255,255,.16); }
.dcc.t-6 .dcc-fx::before { content:""; position:absolute; inset:0;
  background:radial-gradient(120% 70% at 15% -10%, rgba(255,255,255,.42), rgba(255,255,255,.08) 38%, transparent 55%); }
.dcc.t-6 .dcc-fx::after { content:""; position:absolute; top:-50%; bottom:-50%; width:34%; left:-60%; transform:rotate(18deg);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent); animation:dcc-sweep 6s ease-in-out infinite; }
@keyframes dcc-sweep { 0%,55% { left:-60%; } 90%,100% { left:140%; } }
.dcc.t-6 { box-shadow:inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.35), var(--shadow); }
.dcc.t-6 .dcc-role { color:#fff; }
.dcc.t-6 .dcc-ic { background:rgba(255,255,255,.12); color:#fff; }
.dcc.t-6 .dcc-soc a { color:#fff; background:rgba(255,255,255,.1); border-color:rgba(255,255,255,.22); }

/* ── 7 Aurora ────────────────────────────────────── */
.dcc.t-7 { --bg:#070b1d; --sc:#d0dbea; }
.dcc.t-7 .dcc-fx::before { content:""; position:absolute; inset:-40%;
  background:conic-gradient(from 0deg at 50% 50%, var(--ac), #4da3ff, #f472b6, #ffc229, var(--ac));
  filter:blur(60px); opacity:.55; animation:dcc-spin 22s linear infinite; }
.dcc.t-7 .dcc-fx::after { content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(7,11,29,.15), rgba(7,11,29,.82) 55%); }
@keyframes dcc-spin { to { transform:rotate(1turn); } }
.dcc.t-7 .dcc-avatar { border-color:#fff; }
.dcc.t-7 .dcc-name { font-size:26px; }

/* ── 8 Executive ─────────────────────────────────── */
.dcc.t-8 { --bg:linear-gradient(170deg, #1c1f24, #111316 70%); --sc:#c9c6bd; --line:color-mix(in srgb, var(--ac) 30%, transparent); }
.dcc.t-8 .dcc-fx::before { content:""; position:absolute; inset:0;
  background:repeating-linear-gradient(45deg, rgba(255,255,255,.022) 0 1px, transparent 1px 7px); }
.dcc.t-8 .dcc-fx::after { content:""; position:absolute; inset:9px; border-radius:17px; border:1px solid color-mix(in srgb, var(--ac) 55%, transparent); }
.dcc.t-8 .dcc-name { font-family:"Playfair Display", Georgia, serif; font-weight:600; font-size:25px; }
.dcc.t-8 .dcc-role { text-transform:uppercase; letter-spacing:.14em; font-size:12px; }
.dcc.t-8 .dcc-avatar { border-width:2px; box-shadow:0 0 0 5px rgba(0,0,0,.4), 0 0 0 6px color-mix(in srgb, var(--ac) 60%, transparent); }
.dcc.t-8 .dcc-ic { background:transparent; border:1px solid color-mix(in srgb, var(--ac) 55%, transparent); }

/* ── 9 Minimal ───────────────────────────────────── */
.dcc.t-9 { --bg:#ffffff; --shadow:0 1px 0 rgba(15,23,42,.06), 0 24px 50px -30px rgba(0,20,50,.35); border:1px solid rgba(15,23,42,.08); }
.dcc.t-9 .dcc-name { font-size:27px; font-weight:500; letter-spacing:-.02em; }
.dcc.t-9 .dcc-role { font-weight:500; }
.dcc.t-9 .dcc-avatar { border-width:0; box-shadow:0 0 0 1px rgba(15,23,42,.1), 0 10px 22px -12px rgba(0,0,0,.35); }
.dcc.t-9 .dcc-ic { background:transparent; border:1px solid rgba(15,23,42,.14); }
.dcc.t-9 .dcc-bio { background:transparent; border:none; padding:0; text-align:center; font-style:italic; }
.dcc.t-9 .dcc-fx::before { content:""; position:absolute; left:50%; top:0; width:44px; height:3px; margin-left:-22px; background:var(--ac); border-radius:0 0 3px 3px; }

/* ── 10 Banner ───────────────────────────────────── */
.dcc.t-10 { --bg:#ffffff; border:1px solid rgba(15,23,42,.08); }

/* ── template picker thumbnails (.dct = tiny card) ─ */
.dct { border-radius:14px; font-size:0; height:118px; box-shadow:0 10px 24px -14px rgba(0,0,0,.6); }
.dct .dcc-in { padding:14px 12px; height:100%; display:flex; flex-direction:column; gap:6px; }
.dct.t-4 .dcc-in { margin:7px; height:calc(100% - 14px); padding:10px; border-radius:11px; }
.dct .th-top { display:flex; align-items:center; gap:7px; }
.dct.l-center .th-top, .dct.l-banner .th-top { flex-direction:column; gap:5px; }
.dct .th-av { width:24px; height:24px; border-radius:50%; flex:none; border:2px solid var(--ac); background:color-mix(in srgb, var(--tc) 22%, transparent); }
.dct .th-l { display:grid; gap:4px; flex:1; width:100%; }
.dct.l-center .th-l, .dct.l-banner .th-l { justify-items:center; }
.dct .th-l b { display:block; height:6px; width:70%; border-radius:3px; background:var(--tc); opacity:.9; }
.dct .th-l s { display:block; height:4px; width:46%; border-radius:2px; background:var(--ac-ink); }
.dct .th-r { display:block; height:4px; width:80%; border-radius:2px; background:var(--sc); opacity:.45; }
.dct .th-r + .th-r { width:62%; }
.dct .th-btn { margin-top:auto; height:12px; border-radius:5px; background:var(--ac); }
.dct.l-banner .dcc-cover { height:34px; margin:-14px -12px -4px; }
.dct.l-banner .th-av { width:28px; height:28px; border:3px solid #fff; margin-top:-14px; position:relative; }

/* ── published card page ─────────────────────────── */
.dc-page, .dc-page * { box-sizing:border-box; }
.dc-page { margin:0; min-height:100vh; background:#000d1c; color:#eaf2f8; font-family:"Readex Pro", system-ui, sans-serif;
  display:flex; flex-direction:column; align-items:center; justify-content:center; padding:28px 16px 40px; overflow-x:hidden; }
.dc-page::before { content:""; position:fixed; inset:0; z-index:-2;
  background:
    radial-gradient(900px 600px at 80% -10%, rgba(34,197,94,.16), transparent 60%),
    radial-gradient(700px 520px at -10% 30%, rgba(77,163,255,.14), transparent 60%),
    radial-gradient(600px 400px at 50% 110%, rgba(255,194,41,.08), transparent 60%), #000d1c; }
.dc-page::after { content:""; position:fixed; inset:0; z-index:-1; pointer-events:none;
  background-image:linear-gradient(rgba(160,200,235,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(160,200,235,.08) 1px, transparent 1px);
  background-size:44px 44px; mask-image:radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 80%); -webkit-mask-image:radial-gradient(ellipse 80% 70% at 50% 30%, #000 25%, transparent 80%); }
.dc-stage { width:100%; max-width:430px; perspective:1200px; }
.dc-stage .dcc { animation:dc-in .9s cubic-bezier(.2,.8,.2,1) both; transform-style:preserve-3d; transition:transform .25s ease-out; }
@keyframes dc-in { from { opacity:0; transform:translateY(28px) rotateX(10deg) scale(.97); } }
.dc-share { margin-top:22px; width:100%; max-width:430px; text-align:center; padding:16px; border-radius:18px;
  background:linear-gradient(150deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border:1px solid rgba(160,200,235,.18);
  backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); animation:dc-in .9s .15s cubic-bezier(.2,.8,.2,1) both; }
.dc-share p { font-size:13px; color:#b9cadb; margin:0 0 12px; }
.dc-share .row { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.dc-share a, .dc-share button { display:inline-flex; align-items:center; gap:8px; font:600 14px "Readex Pro", system-ui, sans-serif; padding:10px 16px; border-radius:12px; cursor:pointer;
  border:1px solid rgba(160,200,235,.25); background:rgba(255,255,255,.05); color:#eaf2f8; text-decoration:none; transition:transform .2s, border-color .2s; }
.dc-share a:hover, .dc-share button:hover { transform:translateY(-2px); border-color:#22c55e; }
.dc-share .wa { color:#4ade80; border-color:rgba(37,211,102,.4); background:rgba(37,211,102,.1); }
.dc-share svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.dc-own { display:inline-block; margin-top:14px; font-size:13px; color:#9fb3c8; text-decoration:none; }
.dc-own b { color:#22c55e; font-weight:600; }
.dc-own:hover { color:#fff; }

@media (max-width:380px) {
  .dcc-in { padding:22px 18px 18px; }
  .dcc-name { font-size:21px; }
  .dcc-avatar { width:64px; height:64px; }
  .dcc.l-banner .dcc-cover { margin:-22px -18px 0; }
}
@media (prefers-reduced-motion:reduce) {
  .dcc *, .dcc *::before, .dcc *::after, .dcc .dcc-fx::before, .dcc .dcc-fx::after, .dc-stage .dcc, .dc-share { animation:none !important; }
}
