/* ClickCard site-wide appearance themes: basic, Windows 11, official */
:root{
  --cc-bg:#f6fbff;
  --cc-bg-soft:#ffffff;
  --cc-surface:#ffffff;
  --cc-surface-2:#f8fcff;
  --cc-surface-3:#eef8ff;
  --cc-text:#0f172a;
  --cc-heading:#071226;
  --cc-muted:#667085;
  --cc-border:#d8f2ff;
  --cc-primary:#0ea5e9;
  --cc-primary-2:#38bdf8;
  --cc-accent:#ffd166;
  --cc-danger:#ef476f;
  --cc-success:#16a34a;
  --cc-shadow:0 12px 32px rgba(14,165,233,.10);
  --cc-radius:18px;
}

html[data-cc-theme="dark"]{
  color-scheme:dark;
  --cc-bg:#020617;
  --cc-bg-soft:#050a16;
  --cc-surface:#0b1220;
  --cc-surface-2:#111827;
  --cc-surface-3:#172033;
  --cc-text:#f1f5f9;
  --cc-heading:#ffffff;
  --cc-muted:#b6c2d2;
  --cc-border:#233247;
  --cc-primary:#38bdf8;
  --cc-primary-2:#2563eb;
  --cc-accent:#fbbf24;
  --cc-danger:#fb7185;
  --cc-success:#34d399;
  --cc-shadow:0 18px 42px rgba(0,0,0,.48);
}

html[data-cc-theme="win11"]{
  color-scheme:light;
  --cc-bg:#edf3fb;
  --cc-bg-soft:#f8fbff;
  --cc-surface:rgba(255,255,255,.68);
  --cc-surface-2:rgba(255,255,255,.48);
  --cc-surface-3:rgba(245,249,255,.72);
  --cc-text:#111827;
  --cc-heading:#0b1220;
  --cc-muted:#556070;
  --cc-border:rgba(10,132,255,.20);
  --cc-primary:#0a84ff;
  --cc-primary-2:#7c3aed;
  --cc-accent:#00a3ff;
  --cc-shadow:0 22px 50px rgba(23,37,84,.13);
}

html[data-cc-theme] body{
  background:
    radial-gradient(circle at 12% 4%, color-mix(in srgb,var(--cc-primary) 18%,transparent), transparent 360px),
    radial-gradient(circle at 90% 18%, color-mix(in srgb,var(--cc-accent) 12%,transparent), transparent 300px),
    linear-gradient(180deg,var(--cc-bg) 0%,var(--cc-bg-soft) 100%) !important;
  color:var(--cc-text) !important;
}
html[data-cc-theme="dark"] body{
  background:
    radial-gradient(circle at 8% 2%, rgba(56,189,248,.16), transparent 360px),
    radial-gradient(circle at 92% 14%, rgba(37,99,235,.18), transparent 320px),
    linear-gradient(180deg,#020617 0%,#050a16 55%,#020617 100%) !important;
}
html[data-cc-theme="win11"] body{
  background:
    radial-gradient(circle at 6% 5%, rgba(10,132,255,.18), transparent 330px),
    radial-gradient(circle at 88% 10%, rgba(124,58,237,.12), transparent 320px),
    linear-gradient(135deg,#eef6ff 0%,#f9fbff 45%,#eef2ff 100%) !important;
}

html[data-cc-theme] .main,
html[data-cc-theme] .main-content,
html[data-cc-theme] .container,
html[data-cc-theme] .dashboard,
html[data-cc-theme] .layout,
html[data-cc-theme] section,
html[data-cc-theme] .page-shell{
  color:var(--cc-text) !important;
}
html[data-cc-theme="dark"] .main,
html[data-cc-theme="dark"] .main-content,
html[data-cc-theme="dark"] .container,
html[data-cc-theme="dark"] .dashboard,
html[data-cc-theme="dark"] .layout,
html[data-cc-theme="dark"] section:not(.hero):not(.welcome-section){
  background:transparent !important;
}

html[data-cc-theme] .card,
html[data-cc-theme] .panel,
html[data-cc-theme] .stat-card,
html[data-cc-theme] .compact-card,
html[data-cc-theme] .table-container,
html[data-cc-theme] .guestbook-container,
html[data-cc-theme] .settings-section,
html[data-cc-theme] .messages-container,
html[data-cc-theme] .notifications-full-page,
html[data-cc-theme] .template-card,
html[data-cc-theme] .qr-card,
html[data-cc-theme] .modal-content,
html[data-cc-theme] .empty-state,
html[data-cc-theme] .balance-summary,
html[data-cc-theme] .topbar,
html[data-cc-theme] header:not(.hero):not(.welcome-section),
html[data-cc-theme] nav,
html[data-cc-theme] .navbar,
html[data-cc-theme] .header,
html[data-cc-theme] .content-tabs,
html[data-cc-theme] .dropdown,
html[data-cc-theme] .dropdown-menu,
html[data-cc-theme] .notifications-dropdown,
html[data-cc-theme] .user-menu,
html[data-cc-theme] .toolbar,
html[data-cc-theme] .filter-bar,
html[data-cc-theme] .box,
html[data-cc-theme] .item,
html[data-cc-theme] .template-body{
  background:var(--cc-surface) !important;
  color:var(--cc-text) !important;
  border-color:var(--cc-border) !important;
  box-shadow:var(--cc-shadow) !important;
}
html[data-cc-theme="dark"] .header,
html[data-cc-theme="dark"] .topbar,
html[data-cc-theme="dark"] header:not(.hero):not(.welcome-section),
html[data-cc-theme="dark"] nav,
html[data-cc-theme="dark"] .navbar{
  background:#050a16 !important;
  border-color:#1d2a3d !important;
}
html[data-cc-theme="dark"] .dropdown-menu,
html[data-cc-theme="dark"] .dropdown,
html[data-cc-theme="dark"] .notifications-dropdown,
html[data-cc-theme="dark"] .user-menu{
  background:#0b1220 !important;
}

html[data-cc-theme="win11"] .card,
html[data-cc-theme="win11"] .panel,
html[data-cc-theme="win11"] .stat-card,
html[data-cc-theme="win11"] .compact-card,
html[data-cc-theme="win11"] .table-container,
html[data-cc-theme="win11"] .guestbook-container,
html[data-cc-theme="win11"] .settings-section,
html[data-cc-theme="win11"] .messages-container,
html[data-cc-theme="win11"] .notifications-full-page,
html[data-cc-theme="win11"] .template-card,
html[data-cc-theme="win11"] .qr-card,
html[data-cc-theme="win11"] .modal-content,
html[data-cc-theme="win11"] .empty-state,
html[data-cc-theme="win11"] .topbar,
html[data-cc-theme="win11"] header:not(.hero):not(.welcome-section),
html[data-cc-theme="win11"] nav,
html[data-cc-theme="win11"] .navbar,
html[data-cc-theme="win11"] .dropdown-menu,
html[data-cc-theme="win11"] .dropdown{
  backdrop-filter:blur(24px) saturate(1.35) !important;
  -webkit-backdrop-filter:blur(24px) saturate(1.35) !important;
  border:1px solid rgba(255,255,255,.42) !important;
}
html[data-cc-theme="win11"] .btn-primary,
html[data-cc-theme="win11"] .hero,
html[data-cc-theme="win11"] .welcome-section,
html[data-cc-theme="win11"] .balance-card{
  background:linear-gradient(135deg,#0a84ff 0%,#7c3aed 100%) !important;
}

html[data-cc-theme] .hero,
html[data-cc-theme] .welcome-section,
html[data-cc-theme] .balance-card,
html[data-cc-theme] .notifications-header,
html[data-cc-theme] .assistant-header,
html[data-cc-theme] .btn-primary,
html[data-cc-theme] .template-btn-primary,
html[data-cc-theme] button.btn-primary,
html[data-cc-theme] .side-link.active,
html[data-cc-theme] .menu a.active,
html[data-cc-theme] .content-tab.active{
  background:linear-gradient(135deg,var(--cc-primary),var(--cc-primary-2)) !important;
  color:#fff !important;
  border-color:transparent !important;
}
html[data-cc-theme="dark"] .hero,
html[data-cc-theme="dark"] .welcome-section,
html[data-cc-theme="dark"] .balance-card{
  background:
    radial-gradient(circle at 10% 15%, rgba(56,189,248,.20), transparent 180px),
    linear-gradient(135deg,#0f172a 0%,#0b3a5f 55%,#020617 100%) !important;
  color:#fff !important;
}

html[data-cc-theme] .sidebar{
  background:linear-gradient(180deg,color-mix(in srgb,var(--cc-text) 84%,var(--cc-primary) 16%),var(--cc-primary)) !important;
  color:#fff !important;
  border-color:color-mix(in srgb,var(--cc-primary) 24%,transparent) !important;
}
html[data-cc-theme="dark"] .sidebar{
  background:linear-gradient(180deg,#020617 0%,#0b1220 54%,#06152a 100%) !important;
  box-shadow:0 0 0 1px #1d2a3d inset !important;
}
html[data-cc-theme="win11"] .sidebar{
  background:linear-gradient(180deg,rgba(32,54,85,.84),rgba(10,132,255,.76)) !important;
  backdrop-filter:blur(28px) saturate(1.35) !important;
  -webkit-backdrop-filter:blur(28px) saturate(1.35) !important;
}

html[data-cc-theme] input,
html[data-cc-theme] select,
html[data-cc-theme] textarea,
html[data-cc-theme] .form-control,
html[data-cc-theme] .charge-input,
html[data-cc-theme] .code-input,
html[data-cc-theme] .search-input{
  background:var(--cc-surface-2) !important;
  color:var(--cc-text) !important;
  border-color:var(--cc-border) !important;
}
html[data-cc-theme] input::placeholder,
html[data-cc-theme] textarea::placeholder{color:var(--cc-muted) !important;}

html[data-cc-theme] table,
html[data-cc-theme] tbody,
html[data-cc-theme] tr,
html[data-cc-theme] td{
  background:var(--cc-surface) !important;
  color:var(--cc-text) !important;
  border-color:var(--cc-border) !important;
}
html[data-cc-theme] th{
  background:color-mix(in srgb,var(--cc-text) 84%,var(--cc-primary) 16%) !important;
  color:#fff !important;
  border-color:var(--cc-border) !important;
}
html[data-cc-theme="dark"] th{background:#071226 !important;}
html[data-cc-theme] .muted-text,
html[data-cc-theme] .stat-label,
html[data-cc-theme] .small,
html[data-cc-theme] .hint,
html[data-cc-theme] p,
html[data-cc-theme] .text-muted,
html[data-cc-theme] .subtitle,
html[data-cc-theme] .description{color:var(--cc-muted) !important;}
html[data-cc-theme] h1,
html[data-cc-theme] h2,
html[data-cc-theme] h3,
html[data-cc-theme] h4,
html[data-cc-theme] h5,
html[data-cc-theme] label,
html[data-cc-theme] .panel-title,
html[data-cc-theme] .section-title,
html[data-cc-theme] .title,
html[data-cc-theme] .logo-title{color:var(--cc-heading) !important;}
html[data-cc-theme] .hero h1,
html[data-cc-theme] .hero h2,
html[data-cc-theme] .welcome-section h1,
html[data-cc-theme] .welcome-section h2,
html[data-cc-theme] .balance-card h1,
html[data-cc-theme] .balance-card h2,
html[data-cc-theme] .balance-card .balance-amount,
html[data-cc-theme] .balance-card .balance-label{color:#fff !important;}
html[data-cc-theme] a{color:inherit;}
html[data-cc-theme] .btn-outline,
html[data-cc-theme] .template-btn-secondary{
  background:transparent !important;
  color:var(--cc-primary) !important;
  border-color:color-mix(in srgb,var(--cc-primary) 36%,transparent) !important;
}
html[data-cc-theme="dark"] img:not(.site-logo):not(.logo-img){filter:brightness(.92) contrast(1.02);}

.cc-preferences-panel{
  position:fixed;
  top:88px;
  left:18px;
  z-index:3900;
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px;
  border:1px solid var(--cc-border);
  border-radius:18px;
  background:color-mix(in srgb,var(--cc-surface) 94%,transparent);
  box-shadow:0 12px 28px rgba(15,23,42,.12);
  backdrop-filter:blur(16px) saturate(1.2);
  -webkit-backdrop-filter:blur(16px) saturate(1.2);
  direction:ltr;
}
.cc-preferences-panel select,
.cc-preferences-panel button{
  height:38px;
  border:1px solid var(--cc-border) !important;
  border-radius:14px;
  background:var(--cc-surface-2) !important;
  color:var(--cc-text) !important;
  font:800 13px 'Tajawal',system-ui,sans-serif;
  padding:0 10px;
  outline:none;
}
.cc-preferences-panel button{
  width:38px;
  padding:0;
  background:linear-gradient(135deg,var(--cc-primary),var(--cc-primary-2)) !important;
  color:#fff !important;
  cursor:pointer;
}
.cc-preferences-panel select{min-width:105px;}
.cc-preferences-panel.cc-collapsed select{display:none;}
.cc-preferences-panel.cc-collapsed{padding:6px;border-radius:999px;}
.dashboard-assistant,.magic-assistant,.assistant-widget,#dashboardAssistant,#magicAssistant,#assistantWidget{
  bottom:18px !important;
  left:18px !important;
  right:auto !important;
  z-index:3400 !important;
}
@media(max-width:768px){
  .cc-preferences-panel{top:auto;left:auto;right:12px;bottom:86px;max-width:calc(100vw - 24px);gap:6px;}
  .cc-preferences-panel select{min-width:92px;font-size:12px;padding-inline:7px;}
  .cc-preferences-panel button{width:36px;height:36px;}
  .dashboard-assistant,.magic-assistant,.assistant-widget,#dashboardAssistant,#magicAssistant,#assistantWidget{bottom:14px !important;left:12px !important;}
}
html[dir="ltr"] body{direction:ltr;text-align:left;}
html[dir="ltr"] .sidebar{left:0;right:auto;border-left:0;border-right:1px solid rgba(255,255,255,.12);}
html[dir="ltr"] .main,html[dir="ltr"] .main-content{margin-right:0 !important;margin-left:var(--sidebar-w,286px) !important;}
html[dir="ltr"] .menu-badge,html[dir="ltr"] .badge{margin-right:0;margin-left:auto;}
@media(max-width:1050px){html[dir="ltr"] .main,html[dir="ltr"] .main-content{margin-left:0 !important;}}


/* ClickCard language/theme v4 fixes: closed menu + stronger themes */
.cc-preferences-panel{
  position:relative !important;
  top:auto !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
  z-index:3900 !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:0 !important;
  padding:0 !important;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  direction:ltr !important;
  overflow:visible !important;
}
.cc-preferences-panel.cc-floating{position:fixed !important;top:88px !important;left:18px !important;}
.cc-pref-toggle{
  min-width:42px !important;
  width:auto !important;
  height:42px !important;
  border-radius:999px !important;
  padding:0 13px !important;
  border:1px solid var(--cc-border) !important;
  background:linear-gradient(135deg,var(--cc-primary),var(--cc-primary-2)) !important;
  color:#fff !important;
  box-shadow:0 12px 28px rgba(14,165,233,.18) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
}
.cc-pref-label{font:800 12px 'Tajawal',system-ui,sans-serif;white-space:nowrap;display:none;}
.cc-preferences-dropdown{
  position:absolute;
  top:calc(100% + 10px);
  left:0;
  width:230px;
  padding:12px;
  border:1px solid var(--cc-border);
  border-radius:18px;
  background:var(--cc-surface) !important;
  box-shadow:0 18px 42px rgba(15,23,42,.16);
  backdrop-filter:blur(20px) saturate(1.2);
  -webkit-backdrop-filter:blur(20px) saturate(1.2);
  display:grid;
  gap:10px;
  color:var(--cc-text);
}
.cc-preferences-panel.cc-collapsed .cc-preferences-dropdown{display:none !important;}
.cc-preferences-dropdown label{display:grid;gap:6px;font:800 12px 'Tajawal',system-ui,sans-serif;color:var(--cc-muted);}
.cc-preferences-dropdown select{
  width:100%;height:42px;border-radius:14px;border:1px solid var(--cc-border) !important;
  background:var(--cc-surface-2) !important;color:var(--cc-text) !important;
  font:800 13px 'Tajawal',system-ui,sans-serif;padding:0 10px;outline:none;
}
html[dir="rtl"] .cc-preferences-dropdown{left:0;right:auto;}
html[dir="ltr"] .cc-preferences-dropdown{left:auto;right:0;}
@media(max-width:768px){
  .cc-preferences-panel.cc-inline{position:relative !important;}
  .cc-preferences-panel.cc-floating{top:auto !important;left:12px !important;right:auto !important;bottom:86px !important;}
  .cc-preferences-dropdown{width:min(230px,calc(100vw - 28px));left:0;right:auto;}
  .cc-pref-label{display:none;}
}

html[data-cc-theme="dark"]{
  --cc-bg:#00040b;--cc-bg-soft:#020617;--cc-surface:#07111f;--cc-surface-2:#0b1626;--cc-surface-3:#111d30;
  --cc-text:#f8fafc;--cc-heading:#ffffff;--cc-muted:#cbd5e1;--cc-border:#1e3a5f;--cc-primary:#22d3ee;--cc-primary-2:#2563eb;
}
html[data-cc-theme="dark"] body,html[data-cc-theme="dark"] main,html[data-cc-theme="dark"] .main,html[data-cc-theme="dark"] .main-content{
  background:#00040b !important;color:#f8fafc !important;
}
html[data-cc-theme="dark"] .card,html[data-cc-theme="dark"] .panel,html[data-cc-theme="dark"] .stat-card,html[data-cc-theme="dark"] .template-card,html[data-cc-theme="dark"] .compact-card,html[data-cc-theme="dark"] .table-container,html[data-cc-theme="dark"] .guestbook-container,html[data-cc-theme="dark"] .topbar,html[data-cc-theme="dark"] header:not(.hero):not(.welcome-section),html[data-cc-theme="dark"] .header,html[data-cc-theme="dark"] nav,html[data-cc-theme="dark"] .navbar,html[data-cc-theme="dark"] .dropdown-menu,html[data-cc-theme="dark"] .dropdown,html[data-cc-theme="dark"] .user-menu,html[data-cc-theme="dark"] .notifications-dropdown{
  background:#07111f !important;color:#f8fafc !important;border-color:#1e3a5f !important;box-shadow:0 18px 45px rgba(0,0,0,.65) !important;
}
html[data-cc-theme="dark"] h1,html[data-cc-theme="dark"] h2,html[data-cc-theme="dark"] h3,html[data-cc-theme="dark"] h4,html[data-cc-theme="dark"] p,html[data-cc-theme="dark"] span,html[data-cc-theme="dark"] div,html[data-cc-theme="dark"] a,html[data-cc-theme="dark"] td,html[data-cc-theme="dark"] th{color:inherit;}
html[data-cc-theme="dark"] input,html[data-cc-theme="dark"] select,html[data-cc-theme="dark"] textarea{background:#0b1626 !important;color:#f8fafc !important;border-color:#1e3a5f !important;}
html[data-cc-theme="dark"] .hero,html[data-cc-theme="dark"] .welcome-section,html[data-cc-theme="dark"] .balance-card{background:linear-gradient(135deg,#020617 0%,#0f3460 58%,#00040b 100%) !important;color:#fff !important;}

html[data-cc-theme="win11"]{
  --cc-bg:#eaf3ff;--cc-bg-soft:#f7fbff;--cc-surface:rgba(255,255,255,.62);--cc-surface-2:rgba(255,255,255,.42);--cc-surface-3:rgba(231,241,255,.58);
  --cc-text:#152033;--cc-heading:#0f172a;--cc-muted:#536174;--cc-border:rgba(10,132,255,.24);--cc-primary:#0067c0;--cc-primary-2:#7c3aed;--cc-accent:#00a3ff;
}
html[data-cc-theme="win11"] body{
  background:linear-gradient(135deg,#dcecff 0%,#f8fbff 42%,#e9e4ff 100%) !important;color:#152033 !important;
}
html[data-cc-theme="win11"] .card,html[data-cc-theme="win11"] .panel,html[data-cc-theme="win11"] .stat-card,html[data-cc-theme="win11"] .template-card,html[data-cc-theme="win11"] .compact-card,html[data-cc-theme="win11"] .table-container,html[data-cc-theme="win11"] .guestbook-container,html[data-cc-theme="win11"] .topbar,html[data-cc-theme="win11"] header:not(.hero):not(.welcome-section),html[data-cc-theme="win11"] .header,html[data-cc-theme="win11"] nav,html[data-cc-theme="win11"] .navbar,html[data-cc-theme="win11"] .dropdown-menu,html[data-cc-theme="win11"] .dropdown{
  background:rgba(255,255,255,.58) !important;border:1px solid rgba(255,255,255,.65) !important;box-shadow:0 20px 55px rgba(31,78,121,.14) !important;
  backdrop-filter:blur(26px) saturate(1.45) !important;-webkit-backdrop-filter:blur(26px) saturate(1.45) !important;
}
html[data-cc-theme="win11"] .hero,html[data-cc-theme="win11"] .welcome-section,html[data-cc-theme="win11"] .balance-card,html[data-cc-theme="win11"] .btn-primary{background:linear-gradient(135deg,#0067c0 0%,#00a3ff 45%,#7c3aed 100%) !important;color:#fff !important;}

/* ClickCard v5 dark contrast hotfix: keep text readable in dark theme */
html[data-cc-theme="dark"] header,
html[data-cc-theme="dark"] .topbar,
html[data-cc-theme="dark"] nav,
html[data-cc-theme="dark"] .navbar,
html[data-cc-theme="dark"] .header {
  color:#f8fafc !important;
}
html[data-cc-theme="dark"] header *,
html[data-cc-theme="dark"] .topbar *,
html[data-cc-theme="dark"] nav *,
html[data-cc-theme="dark"] .navbar *,
html[data-cc-theme="dark"] .header * {
  color:#f8fafc !important;
}
html[data-cc-theme="dark"] header a,
html[data-cc-theme="dark"] .topbar a,
html[data-cc-theme="dark"] nav a,
html[data-cc-theme="dark"] .navbar a,
html[data-cc-theme="dark"] .header a,
html[data-cc-theme="dark"] .nav-link,
html[data-cc-theme="dark"] .dropdown-toggle {
  color:#f8fafc !important;
  opacity:1 !important;
}
html[data-cc-theme="dark"] header a:hover,
html[data-cc-theme="dark"] .topbar a:hover,
html[data-cc-theme="dark"] nav a:hover,
html[data-cc-theme="dark"] .navbar a:hover,
html[data-cc-theme="dark"] .header a:hover {
  color:#7dd3fc !important;
}
html[data-cc-theme="dark"] .dropdown-menu,
html[data-cc-theme="dark"] .dropdown,
html[data-cc-theme="dark"] .user-menu,
html[data-cc-theme="dark"] .notifications-dropdown,
html[data-cc-theme="dark"] .cc-preferences-dropdown {
  background:#07111f !important;
  border-color:#1e3a5f !important;
  color:#f8fafc !important;
}
html[data-cc-theme="dark"] .dropdown-menu *,
html[data-cc-theme="dark"] .dropdown *,
html[data-cc-theme="dark"] .user-menu *,
html[data-cc-theme="dark"] .notifications-dropdown *,
html[data-cc-theme="dark"] .cc-preferences-dropdown * {
  color:#f8fafc !important;
}
html[data-cc-theme="dark"] .dropdown-menu a:hover,
html[data-cc-theme="dark"] .dropdown a:hover,
html[data-cc-theme="dark"] .user-menu a:hover {
  background:rgba(56,189,248,.14) !important;
  color:#7dd3fc !important;
}
html[data-cc-theme="dark"] .hero,
html[data-cc-theme="dark"] .hero *,
html[data-cc-theme="dark"] .welcome-section,
html[data-cc-theme="dark"] .welcome-section *,
html[data-cc-theme="dark"] .balance-card,
html[data-cc-theme="dark"] .balance-card * {
  color:#ffffff !important;
}
html[data-cc-theme="dark"] .card *,
html[data-cc-theme="dark"] .panel *,
html[data-cc-theme="dark"] .stat-card *,
html[data-cc-theme="dark"] .template-card *,
html[data-cc-theme="dark"] .compact-card *,
html[data-cc-theme="dark"] .table-container *,
html[data-cc-theme="dark"] .guestbook-container * {
  color:inherit;
}
html[data-cc-theme="dark"] .card,
html[data-cc-theme="dark"] .panel,
html[data-cc-theme="dark"] .stat-card,
html[data-cc-theme="dark"] .template-card,
html[data-cc-theme="dark"] .compact-card,
html[data-cc-theme="dark"] .table-container,
html[data-cc-theme="dark"] .guestbook-container {
  color:#f8fafc !important;
}
html[data-cc-theme="dark"] .muted-text,
html[data-cc-theme="dark"] .stat-label,
html[data-cc-theme="dark"] .hint,
html[data-cc-theme="dark"] .subtitle,
html[data-cc-theme="dark"] .description,
html[data-cc-theme="dark"] small,
html[data-cc-theme="dark"] .text-muted {
  color:#cbd5e1 !important;
}
html[data-cc-theme="dark"] .btn-outline,
html[data-cc-theme="dark"] .template-btn-secondary {
  color:#7dd3fc !important;
  border-color:#1e67a8 !important;
  background:rgba(56,189,248,.06) !important;
}
html[data-cc-theme="dark"] .btn-outline:hover,
html[data-cc-theme="dark"] .template-btn-secondary:hover {
  background:rgba(56,189,248,.16) !important;
}
html[data-cc-theme="dark"] .side-link:not(.active),
html[data-cc-theme="dark"] .side-link:not(.active) *,
html[data-cc-theme="dark"] .menu a:not(.active),
html[data-cc-theme="dark"] .menu a:not(.active) * {
  color:#f8fafc !important;
}
html[data-cc-theme="dark"] .side-link.active,
html[data-cc-theme="dark"] .side-link.active *,
html[data-cc-theme="dark"] .menu a.active,
html[data-cc-theme="dark"] .menu a.active * {
  color:#ffffff !important;
}


/* ===== ClickCard final: three visual themes only ===== */
html[data-cc-theme="dark"]{color-scheme:light;}
html[data-cc-theme="light"],
html[data-cc-theme="dark"]{
  --cc-bg:#f6fbff;
  --cc-bg-soft:#ffffff;
  --cc-surface:#ffffff;
  --cc-surface-2:#f8fcff;
  --cc-surface-3:#eef8ff;
  --cc-text:#0f172a;
  --cc-heading:#071226;
  --cc-muted:#667085;
  --cc-border:#d8f2ff;
  --cc-primary:#0ea5e9;
  --cc-primary-2:#38bdf8;
  --cc-accent:#ffd166;
  --cc-shadow:0 12px 32px rgba(14,165,233,.10);
}
html[data-cc-theme="official"]{
  color-scheme:light;
  --cc-bg:#f7f4ed;
  --cc-bg-soft:#fffaf2;
  --cc-surface:#fffdf8;
  --cc-surface-2:#fbf4e6;
  --cc-surface-3:#f4ead7;
  --cc-text:#1f2933;
  --cc-heading:#102033;
  --cc-muted:#6b7280;
  --cc-border:#e4d4b6;
  --cc-primary:#0f766e;
  --cc-primary-2:#1d4ed8;
  --cc-accent:#c8a24a;
  --cc-danger:#b91c1c;
  --cc-success:#047857;
  --cc-shadow:0 18px 42px rgba(76,55,24,.12);
}
html[data-cc-theme="official"] body{
  background:
    radial-gradient(circle at 12% 6%, rgba(200,162,74,.18), transparent 360px),
    radial-gradient(circle at 88% 16%, rgba(15,118,110,.12), transparent 330px),
    linear-gradient(180deg,#f7f4ed 0%,#fffaf2 58%,#ffffff 100%) !important;
}
html[data-cc-theme="official"] .hero,
html[data-cc-theme="official"] .welcome-section,
html[data-cc-theme="official"] .balance-card,
html[data-cc-theme="official"] .btn-primary,
html[data-cc-theme="official"] .template-btn-primary,
html[data-cc-theme="official"] button.btn-primary,
html[data-cc-theme="official"] .content-tab.active{
  background:linear-gradient(135deg,#102033 0%,#0f766e 58%,#c8a24a 100%) !important;
  color:#fff !important;
}
html[data-cc-theme="official"] .sidebar{
  background:linear-gradient(180deg,#102033 0%,#164e63 58%,#0f766e 100%) !important;
  color:#fff !important;
}
html[data-cc-theme="official"] .side-link.active,
html[data-cc-theme="official"] .menu a.active{
  background:linear-gradient(90deg,#c8a24a,#ead58f) !important;
  color:#102033 !important;
}
html[data-cc-theme="win11"] body{
  background:
    radial-gradient(circle at 5% 5%, rgba(10,132,255,.20), transparent 340px),
    radial-gradient(circle at 90% 12%, rgba(124,58,237,.16), transparent 330px),
    linear-gradient(135deg,#eaf4ff 0%,#f9fbff 45%,#eff2ff 100%) !important;
}
html[data-cc-theme="win11"] .hero,
html[data-cc-theme="win11"] .welcome-section,
html[data-cc-theme="win11"] .balance-card,
html[data-cc-theme="win11"] .btn-primary,
html[data-cc-theme="win11"] .template-btn-primary,
html[data-cc-theme="win11"] button.btn-primary,
html[data-cc-theme="win11"] .content-tab.active{
  background:linear-gradient(135deg,#0a84ff 0%,#2563eb 48%,#7c3aed 100%) !important;
  color:#fff !important;
}
html[data-cc-theme="win11"] .sidebar{
  background:linear-gradient(180deg,rgba(31,41,55,.82),rgba(10,132,255,.78)) !important;
  backdrop-filter:blur(28px) saturate(1.4) !important;
  -webkit-backdrop-filter:blur(28px) saturate(1.4) !important;
}

/* Replace previous language/theme floating control with theme-only closed control */
.cc-preferences-panel{display:none!important;}
.cc-theme-floating{position:relative;z-index:3200;display:inline-flex;align-items:center;gap:8px;direction:rtl;}
.cc-theme-floating .cc-theme-toggle{width:42px;height:42px;border:0;border-radius:14px;background:var(--cc-primary,#0ea5e9);color:#fff;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 10px 22px rgba(14,165,233,.22);cursor:pointer;}
.cc-theme-dropdown{position:absolute;top:calc(100% + 10px);inset-inline-start:0;width:210px;background:var(--cc-surface,#fff);border:1px solid var(--cc-border,#d8f2ff);border-radius:18px;box-shadow:var(--cc-shadow);padding:12px;display:block;}
.cc-theme-floating.cc-collapsed .cc-theme-dropdown{display:none;}
.cc-theme-control{display:grid;gap:7px;color:var(--cc-text,#0f172a);font-weight:900;font-size:.82rem;}
.cc-theme-control select{width:100%;min-height:42px;border-radius:14px;border:1px solid var(--cc-border,#d8f2ff);background:var(--cc-surface-2,#f8fcff);color:var(--cc-text,#0f172a);padding:0 12px;font-weight:800;outline:none;}
.cc-theme-control-side{padding:10px 12px;margin:4px;border-radius:14px;background:rgba(255,255,255,.08);color:#fff;}
.cc-theme-control-side select{background:rgba(255,255,255,.95)!important;color:#102033!important;border-color:rgba(255,255,255,.25)!important;}
.cc-theme-control-list{display:flex;align-items:center;gap:10px;padding:.85rem 1rem;border-radius:14px;background:rgba(14,165,233,.08);}
.cc-theme-control-list select{margin-right:auto;max-width:150px;}
@media(max-width:640px){.cc-theme-dropdown{width:190px}.cc-theme-control-list{display:grid}.cc-theme-control-list select{max-width:none;width:100%;}}

/* ===== ClickCard v6: theme selector inside menu/sidebar, no drifting left control ===== */
.cc-theme-control{
  display:grid !important;
  gap:8px !important;
  width:100% !important;
  color:inherit !important;
  font:800 13px 'Tajawal',system-ui,sans-serif !important;
}
.cc-theme-control span{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  color:inherit !important;
}
.cc-theme-control select,
.cc-theme-select{
  width:100% !important;
  min-height:42px !important;
  border-radius:14px !important;
  border:1px solid var(--cc-border) !important;
  background:var(--cc-surface-2) !important;
  color:var(--cc-text) !important;
  font:800 13px 'Tajawal',system-ui,sans-serif !important;
  padding:0 12px !important;
  outline:none !important;
}
.side-links .cc-theme-control-side,
.menu .cc-theme-control-list{
  background:rgba(255,255,255,.10) !important;
  border:1px solid rgba(255,255,255,.14) !important;
  border-radius:16px !important;
  padding:12px !important;
  color:#fff !important;
}
.side-links .cc-theme-control-side select,
.menu .cc-theme-control-list select{
  background:rgba(255,255,255,.96) !important;
  color:#102033 !important;
  border-color:rgba(255,255,255,.30) !important;
}
.cc-theme-nav-item{
  position:relative !important;
  display:inline-flex !important;
  align-items:center !important;
  z-index:80 !important;
}
.cc-theme-nav-toggle{
  border:0 !important;
  background:transparent !important;
  color:inherit !important;
  display:inline-flex !important;
  align-items:center !important;
  gap:7px !important;
  min-height:42px !important;
  padding:0 14px !important;
  border-radius:999px !important;
  font:900 14px 'Tajawal',system-ui,sans-serif !important;
  cursor:pointer !important;
}
.cc-theme-nav-toggle:hover,
.cc-theme-nav-item.open .cc-theme-nav-toggle{
  background:rgba(14,165,233,.12) !important;
  color:var(--cc-primary) !important;
}
.cc-theme-nav-menu{
  position:absolute !important;
  top:calc(100% + 10px) !important;
  inset-inline-start:0 !important;
  width:240px !important;
  padding:12px !important;
  border:1px solid var(--cc-border) !important;
  border-radius:18px !important;
  background:var(--cc-surface) !important;
  color:var(--cc-text) !important;
  box-shadow:0 18px 42px rgba(15,23,42,.16) !important;
  display:none !important;
}
.cc-theme-nav-item.open .cc-theme-nav-menu{display:block !important;}
html[dir="rtl"] .cc-theme-nav-menu{left:auto !important;right:0 !important;}
html[dir="ltr"] .cc-theme-nav-menu{left:0 !important;right:auto !important;}
.cc-fallback-only{
  position:fixed !important;
  top:88px !important;
  right:16px !important;
  left:auto !important;
}
@media(max-width:900px){
  .cc-theme-nav-item{display:flex !important;width:100% !important;flex-direction:column !important;align-items:stretch !important;}
  .cc-theme-nav-toggle{width:100% !important;justify-content:center !important;}
  .cc-theme-nav-menu{position:static !important;width:100% !important;margin-top:8px !important;box-shadow:none !important;}
}

/* ===== ClickCard v7: theme selector only inside menus/account/sidebar ===== */
.cc-theme-floating,
.cc-theme-nav-item,
.cc-fallback-only{display:none!important;}
.cc-account-theme-item{
  margin-top:8px!important;
  padding-top:8px!important;
  border-top:1px solid var(--cc-border,#d8f2ff)!important;
}
.cc-account-theme-item .cc-theme-control-account{
  padding:10px!important;
  border-radius:14px!important;
  background:rgba(14,165,233,.08)!important;
  color:var(--cc-text,#0f172a)!important;
}
.cc-account-theme-item .cc-theme-control-account select{
  background:var(--cc-surface-2,#f8fcff)!important;
  color:var(--cc-text,#0f172a)!important;
}
#mainNav .cc-nav-appearance-item .cc-theme-control-mobile{
  padding:10px!important;
  background:rgba(14,165,233,.08)!important;
  border:1px solid rgba(14,165,233,.14)!important;
  border-radius:16px!important;
  color:var(--cc-text,#0f172a)!important;
}
#mainNav .cc-nav-appearance-item .cc-theme-control-mobile select{
  background:#fff!important;
  color:#0f172a!important;
  border-color:rgba(14,165,233,.18)!important;
}
html[data-cc-theme="official"]{
  color-scheme:light;
  --cc-bg:#f5f1e8;
  --cc-bg-soft:#fffaf2;
  --cc-surface:#fffdf8;
  --cc-surface-2:#f8f3e8;
  --cc-surface-3:#efe6d5;
  --cc-text:#1f2933;
  --cc-heading:#111827;
  --cc-muted:#6b6257;
  --cc-border:#e5d5bd;
  --cc-primary:#1d4ed8;
  --cc-primary-2:#0f766e;
  --cc-accent:#c58a23;
  --cc-shadow:0 18px 42px rgba(92,64,32,.12);
}
html[data-cc-theme="official"] body{
  background:
    radial-gradient(circle at 8% 8%,rgba(197,138,35,.14),transparent 330px),
    radial-gradient(circle at 88% 12%,rgba(15,118,110,.12),transparent 330px),
    linear-gradient(180deg,#f5f1e8 0%,#fffaf2 100%)!important;
}
html[data-cc-theme="official"] .hero,
html[data-cc-theme="official"] .welcome-section,
html[data-cc-theme="official"] .balance-card,
html[data-cc-theme="official"] .btn-primary,
html[data-cc-theme="official"] .template-btn-primary,
html[data-cc-theme="official"] button.btn-primary,
html[data-cc-theme="official"] .content-tab.active{
  background:linear-gradient(135deg,#1d4ed8 0%,#0f766e 100%)!important;
  color:#fff!important;
}
html[data-cc-theme="official"] .sidebar{
  background:linear-gradient(180deg,#1f2937 0%,#1d4ed8 58%,#0f766e 100%)!important;
}
