/* GimmeCard client-only dark surface refinements. Loaded by index.html, never admin.
   All rules activate only after a verified session enables the experimental theme. */
:root[data-theme="dark"] .app-shell{background:var(--bg);color:var(--text)}
:root[data-theme="dark"] .app-shell .card,
:root[data-theme="dark"] .app-shell .product,
:root[data-theme="dark"] .app-shell .acc-card{
  background:var(--card);border-color:var(--line);color:var(--text);
}
:root[data-theme="dark"] .app-shell .primary{
  background:linear-gradient(135deg,var(--button-bg),var(--button-end));
  color:var(--button-text);box-shadow:0 8px 22px rgba(0,0,0,.19);
}
:root[data-theme="dark"] .app-shell .secondary{background:var(--card);border-color:var(--line);color:var(--green)}
:root[data-theme="dark"] .app-shell :is(input,select,textarea,.input){
  color:var(--text);background:var(--input-bg);border-color:var(--line);
}
:root[data-theme="dark"] .app-shell input::placeholder,
:root[data-theme="dark"] .app-shell textarea::placeholder{color:var(--muted);opacity:1}
:root[data-theme="dark"] .app-shell :is(.notice,.product-requirements){
  background:var(--warning-soft);color:var(--warning);border-color:var(--line);
}
:root[data-theme="dark"] .app-shell .field-error,
:root[data-theme="dark"] .app-shell .application-delete .danger{color:var(--danger)}
:root[data-theme="dark"] .app-shell .registration-upload-icon{background:var(--surface-elevated);color:var(--green)}
:root[data-theme="dark"] .app-shell .registration-upload.has-file{background:var(--green-soft)}
:root[data-theme="dark"] .app-shell .confirmation-needed{background:var(--green-soft);color:var(--green-text)}
:root[data-theme="dark"] .app-shell .price-wait-clock{border-color:var(--muted)}
:root[data-theme="dark"] .app-shell .price-wait-clock::before,
:root[data-theme="dark"] .app-shell .price-wait-clock span{background:var(--muted)}
/* Application statuses: override light-only hero gradient, white embedded content. */
:root[data-theme="dark"] .app-shell .application-status-card.card{
  background:var(--card);color:var(--text);border-color:var(--line);
}
:root[data-theme="dark"] .app-shell .application-status-header{
  background:linear-gradient(125deg,#233932 0%,#1e2d2f 52%,#233a34 100%);
}
:root[data-theme="dark"] .app-shell .application-status-header .status-heading h2{color:var(--text)}
:root[data-theme="dark"] .app-shell .application-status-header .status-description{color:var(--muted)}
:root[data-theme="dark"] .app-shell .application-status-card .status-indicator{
  border-color:#325449;background:linear-gradient(140deg,#31ae80,#116a4d);color:#f1fff6;
}
:root[data-theme="dark"] .app-shell .application-status-header .status-decoration{color:var(--green)}
:root[data-theme="dark"] .app-shell .application-status-header .status-decoration::before{
  background:radial-gradient(ellipse at 70% 70%,#2b5142 0 48%,transparent 49%),
             radial-gradient(ellipse at 25% 25%,#233c35 0 42%,transparent 43%);
}
:root[data-theme="dark"] .app-shell .application-status-card .application-status-body,
:root[data-theme="dark"] .app-shell .application-status-card .status-embedded.card{
  background:var(--card);color:var(--text);border-color:var(--line);
}
:root[data-theme="dark"] .app-shell .application-status-body .price{color:var(--green)}
:root[data-theme="dark"] .app-shell .status-description{color:var(--muted)}
/* Uniform semantic pills: preserve category, adapt contrast. */
:root[data-theme="dark"] .app-shell .order-list-copy .status-badge{
  background:var(--status-neutral-bg);color:var(--status-neutral-fg);
}
:root[data-theme="dark"] .app-shell .order-list-copy :is(.status-price_ready,.status-awaiting_payment){
  background:var(--status-yellow-bg);color:var(--status-yellow-fg);
}
:root[data-theme="dark"] .app-shell .order-list-copy .status-passport_required{
  background:var(--status-red-bg);color:var(--status-red-fg);
}
:root[data-theme="dark"] .app-shell .order-list-copy :is(.status-paid,.status-confirmed,.status-done){
  background:var(--status-green-bg);color:var(--status-green-fg);
}
:root[data-theme="dark"] .app-shell .order-list-copy :is(.status-receipt_uploaded,.status-card_issued){
  background:var(--status-purple-bg);color:var(--status-purple-fg);
}
:root[data-theme="dark"] .app-shell .order-list-copy .status-action{
  background:var(--warning-soft);color:var(--warning);
}
/* Payment, notifications, customer review and form validation. */
:root[data-theme="dark"] .app-shell .payment-details{color:var(--text)}
:root[data-theme="dark"] .app-shell .notification-item.is-unread{background:#263a33;color:var(--text)}
:root[data-theme="dark"] .app-shell .notification-item.is-read{background:var(--card);color:var(--text)}
:root[data-theme="dark"] .app-shell .card-photo-frame{background:var(--surface-elevated)}
:root[data-theme="dark"] .app-shell .card-photo-skeleton,
:root[data-theme="dark"] .app-shell .card-media-skeleton{
  background:linear-gradient(110deg,#263238,#39494b,#263238);
  background-size:200% 100%;
}
/* Delivery method, chosen date, manual CDEK fallback. The third-party
   CDEK iframe owns its own colors and is never recolored by parent CSS. */
:root[data-theme="dark"] .app-shell .delivery-form,
:root[data-theme="dark"] .app-shell .delivery-summary,
:root[data-theme="dark"] .app-shell .delivery-method{
  background:var(--card);border-color:var(--line);color:var(--text);
}
:root[data-theme="dark"] .app-shell .delivery-method.selected{
  background:var(--green-soft);border-color:var(--green);color:var(--text);
}
:root[data-theme="dark"] .app-shell .delivery-summary .fact-row{border-color:var(--line)}
:root[data-theme="dark"] .app-shell .calendar-day{background:var(--surface-elevated);color:var(--text)}
:root[data-theme="dark"] .app-shell .calendar-day.selected{background:var(--green);color:#10231a}
:root[data-theme="dark"] .app-shell .calendar-day:disabled{opacity:.45}
:root[data-theme="dark"] .app-shell .delivery-cdek-manual{
  background:var(--surface-elevated);border-color:var(--line);color:var(--text);
}
:root[data-theme="dark"] .cdek-overlay{background:var(--bg)}
/* Referral, assistance, promo and card details. */
:root[data-theme="dark"] .app-shell .gimme-promo,
:root[data-theme="dark"] .app-shell .gimme-promo.promo-tone-neutral{
  background:var(--card);border-color:var(--line);color:var(--text);
}
:root[data-theme="dark"] .app-shell .promo-icon-zone{border-color:var(--line);color:var(--green)}
:root[data-theme="dark"] .app-shell .promo-icon-zone span{background:var(--green-soft)}
:root[data-theme="dark"] .app-shell .referral-promo-close{color:var(--muted)}
:root[data-theme="dark"] .app-shell .promo-input-block{
  background:var(--card);border-color:var(--line);color:var(--text);
}
:root[data-theme="dark"] .app-shell .promo-input-icon{background:var(--green-soft);color:var(--green)}
:root[data-theme="dark"] .app-shell .promo-input-tabs{border-color:var(--line)}
:root[data-theme="dark"] .app-shell .promo-input-tabs button[aria-pressed=true]{
  background:var(--green-soft);color:var(--green-text);box-shadow:inset 0 0 0 1px var(--line);
}
:root[data-theme="dark"] .app-shell .promo-input-info{background:var(--green-soft);color:var(--green-text)}
:root[data-theme="dark"] .app-shell .promo-input-info button{color:var(--green)}
:root[data-theme="dark"] .app-shell .telegram-write-access{background:var(--green-soft);border-color:var(--line)}
:root[data-theme="dark"] .app-shell .recommendation-link{background:var(--surface-elevated);border-color:var(--line)}
:root[data-theme="dark"] .app-shell .recommendation-hero{background:linear-gradient(130deg,#243d32,var(--card))}
:root[data-theme="dark"] .app-shell .faq, 
:root[data-theme="dark"] .app-shell .help-screen{color:var(--text)}
/* Admin-only appearance selector (never rendered for non-admin users). */
.profile-appearance-card{padding:14px 16px;box-shadow:none}
.profile-appearance-card>p{margin:0 0 12px;line-height:1.45}
.profile-theme-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.profile-theme-choice{display:grid;place-items:center;min-width:0;min-height:44px;
  border:1px solid var(--line);border-radius:12px;padding:9px 5px;
  background:var(--surface-elevated);color:var(--text);
  text-align:center;font-size:12px;line-height:1.3;font-weight:600;
}
.profile-theme-choice[aria-pressed="true"]{
  background:var(--green-soft);color:var(--green-text);border-color:var(--green);
}
.profile-theme-choice:focus-visible{outline:2px solid var(--green);outline-offset:2px}
@media(max-width:360px){.profile-theme-modes{gap:4px}.profile-theme-choice{font-size:11px;padding:8px 3px}}

/* Additional surfaces outside the main scroll container: dialogs and camera. */
:root[data-theme="dark"] :is(.gimme-camera,.camera-sheet,.workflow-exit-dialog){
  background:var(--card);color:var(--text);border-color:var(--line);
}
:root[data-theme="dark"] :is(.gimme-camera,.camera-sheet,.workflow-exit-dialog) .secondary{
  background:var(--surface-elevated);color:var(--green);border-color:var(--line);
}
:root[data-theme="dark"] .app-shell .calendar-day.blocked{background:var(--danger-soft);color:var(--danger);opacity:1}
:root[data-theme="dark"] .app-shell .calendar-day.past{background:var(--surface-elevated);color:var(--muted);opacity:.55}
:root[data-theme="dark"] .app-shell .application-status-card .status-decoration-icon{
  fill:var(--card);filter:drop-shadow(0 5px 5px rgba(0,0,0,.28));
}
:root[data-theme="dark"] .app-shell .telegram-home-shortcut .telegram-shortcut-later{
  color:var(--green-text);
}

.profile-theme-label{font-weight:600;color:var(--text)}

.profile-theme-icon{display:block;flex-shrink:0}
