/* =========================================================
   TrendWatch — Emerald / Ivory visual system
   Inspired by the supplied admin-login reference UI.
   This file is loaded after page-local styles so every page
   follows the same emerald/ivory theme when data-theme=emerald.
   ========================================================= */

html[data-theme="emerald"] body {
  --emerald-900: #17352a;
  --emerald-800: #244a3c;
  --emerald-700: #3f6255;
  --emerald-600: #527064;
  --emerald-500: #6f8b7f;
  --emerald-200: #cbd8d0;
  --emerald-100: #e3ebe6;
  --ivory: #f5f4ef;
  --paper: #ffffff;
  --ink: #141917;
  --ink-soft: #303b35;
  --line: #d7dfda;
  --accent: #6b8a7b;
  --accent-strong: #426657;
}

html[data-theme="emerald"] body {
  background:
    radial-gradient(circle at 8% 0%, rgba(107, 138, 123, .18), transparent 34%),
    linear-gradient(180deg, #fbfbf8 0%, #f1f3ef 100%) !important;
  color: var(--ink) !important;
}

/* Global text/link normalization */
html[data-theme="emerald"] body :is(h1, h2, h3, h4, h5, h6, p, li, label, dt, dd, small, strong, span) {
  text-shadow: none !important;
  color: #000;
}

html[data-theme="emerald"] body :is(h1, h2, h3, h4, h5, h6) {
  color: var(--ink) !important;
}

html[data-theme="emerald"] body a {
  color: var(--accent-strong);
}

html[data-theme="emerald"] body a:hover {
  color: #2f5143;
}

/* Site shell */
html[data-theme="emerald"] body .site-header,
html[data-theme="emerald"] body .header,
html[data-theme="emerald"] body .admin-header,
html[data-theme="emerald"] body .admin-topbar {
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html[data-theme="emerald"] body :is(.logo-word, .logo, .admin-page .logo, .info-brand, .admin-brand) {
  color: var(--ink) !important;
}

html[data-theme="emerald"] body :is(.nav-link, .admin-link, .cart-label, .info-nav a, .store-link) {
  color: #000;
}

/* White/ivory content surfaces */
html[data-theme="emerald"] body :is(.product-card, .cart-drawer, .modal-content, .checkout-card, .account-card, .panel, .card, .tw-auth-card, .product-detail-card, .filters-card, .orders-card, .stat-card, .order-card, .info-card) {
  background: rgba(255, 255, 255, .94) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
  box-shadow: 0 18px 48px rgba(43, 70, 57, .07) !important;
}

html[data-theme="emerald"] body :is(input, textarea, select, .field) {
  color: var(--ink) !important;
  border-color: #cbd7d0 !important;
  box-shadow: none !important;
}

html[data-theme="emerald"] body :is(input, textarea, select)::placeholder {
  color: #87928c !important;
}

/* Buttons */
html[data-theme="emerald"] body :is(.button-gold, .btn-primary, .add-cart, .admin-submit) {
  background: linear-gradient(135deg, #3ca97d, #357c62) !important;
  color: #fff !important;
  border-color: #3f6255 !important;
  box-shadow: 0 10px 24px rgba(63, 98, 85, .18) !important;
}

html[data-theme="emerald"] body :is(.button-gold, .btn-primary, .add-cart, .admin-submit):hover {
  background: linear-gradient(135deg, #648376, #4b6f60) !important;
}

html[data-theme="emerald"] body :is(.button-quiet, .btn-outline) {
  background: #fff !important;
  color: #3f6255 !important;
  border-color: #cbd7d0 !important;
}

/* Hero / large visual sections */
html[data-theme="emerald"] body :is(.hero, .collection, .benefits, .section-space, .tw-auth-showcase) {
  background: transparent !important;
  color: var(--ink) !important;
}

html[data-theme="emerald"] body .hero {
  background:
    radial-gradient(circle at 78% 28%, rgba(82, 112, 100, .16), transparent 35%),
    linear-gradient(180deg, #fbfbf8, #eef2ee) !important;
}

html[data-theme="emerald"] body :is(.hero h1, .collection h2, .hero-description, .section-description) {
  color: var(--ink) !important;
}

html[data-theme="emerald"] body :is(.hero-art, .story-art, .closing-banner) {
  color: var(--ink) !important;
}

/* Footer */
html[data-theme="emerald"] body .site-footer {
  background: #e6ece8 !important;
  color: #25332c !important;
  border-top: 1px solid #ccd8d1 !important;
}

html[data-theme="emerald"] body :is(.footer-main, .footer-bottom, .footer-main p, .footer-bottom) {
  color: #48564f !important;
}

html[data-theme="emerald"] body :is(.footer-main a, .footer-admin, .footer-bottom a) {
  color: #3f6255 !important;
}

/* Product/detail */
html[data-theme="emerald"] body .detail-media {
  background: linear-gradient(145deg, #edf3ef, #fff) !important;
  border-color: #d0ddd5 !important;
}

html[data-theme="emerald"] body :is(.detail-placeholder, .detail-stock, .color-list span, .detail-price b) {
  color: #3f6255 !important;
}

html[data-theme="emerald"] body :is(.reserve-box, .spec-grid div) {
  background: #f1f5f2 !important;
  border-color: #d5e0da !important;
  color: var(--ink) !important;
}

/* Informational pages: about / faq / shipping / terms / privacy / 404 */
html[data-theme="emerald"] body.info-page {
  background:
    radial-gradient(circle at 10% 0%, rgba(82, 112, 100, .16), transparent 34%),
    linear-gradient(180deg, #fbfbf8 0%, #eef2ef 100%) !important;
  color: var(--ink) !important;
}

html[data-theme="emerald"] body.info-page .info-header {
  background: rgba(255, 255, 255, .88) !important;
  border-bottom-color: var(--line) !important;
}

html[data-theme="emerald"] body.info-page .info-brand {
  color: var(--ink) !important;
}

html[data-theme="emerald"] body.info-page .info-brand span,
html[data-theme="emerald"] body.info-page .info-kicker,
html[data-theme="emerald"] body.info-page .info-step:before {
  color: var(--accent-strong) !important;
}

html[data-theme="emerald"] body.info-page .info-nav a:hover {
  color: #2f5143 !important;
}

html[data-theme="emerald"] body.info-page .info-main h1 {
  color: var(--ink) !important;
}

html[data-theme="emerald"] body.info-page .info-lead {
  color: #4c5952 !important;
}

html[data-theme="emerald"] body.info-page .info-card {
  background: rgba(255, 255, 255, .94) !important;
  border-color: var(--line) !important;
  box-shadow: 0 16px 40px rgba(43, 70, 57, .06) !important;
}

html[data-theme="emerald"] body.info-page .info-card h2 {
  color: var(--accent-strong) !important;
}

html[data-theme="emerald"] body.info-page .info-card p,
html[data-theme="emerald"] body.info-page .info-card li {
  color: #414d47 !important;
}

html[data-theme="emerald"] body.info-page .info-step {
  border-bottom-color: var(--line) !important;
}

html[data-theme="emerald"] body.info-page .back-home {
  color: #fff !important;
  background: #526f62 !important;
  border-color: #526f62 !important;
}

html[data-theme="emerald"] body.info-page .info-footer {
  background: #e6ece8 !important;
  color: #4e5d55 !important;
  border-top-color: #ccd8d1 !important;
}

/* Login/admin-login: match supplied reference composition */
html[data-theme="emerald"] body.admin-login-page {
  background:
    radial-gradient(ellipse at 15% 10%, rgba(82, 112, 100, .15), transparent 34%),
    linear-gradient(180deg, #fafaf7, #edf1ee) !important;
  color: var(--ink) !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-login-layout {
  background: #536c61 !important;
  border-color: #6f877b !important;
  box-shadow: 0 28px 80px rgba(34, 57, 47, .16) !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-intro {
  background: linear-gradient(145deg, #5c756a, #16845a) !important;
  color: #fff !important;
  border-left-color: rgba(255, 255, 255, .18) !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-intro h1,
html[data-theme="emerald"] body.admin-login-page .admin-intro h1 span,
html[data-theme="emerald"] body.admin-login-page .intro-label {
  color: #f7f7f2 !important;
}

html[data-theme="emerald"] body.admin-login-page .intro-description {
  color: #eef2ee !important;
}

html[data-theme="emerald"] body.admin-login-page .intro-label::before {
  background: #d9e1dc !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-form-panel {
  background: #15181d !important;
  color: #f2f3ef !important;
}

html[data-theme="emerald"] body.admin-login-page .form-heading h2,
html[data-theme="emerald"] body.admin-login-page .form-heading p,
html[data-theme="emerald"] body.admin-login-page #loginForm label {
  color: #f1f2ef !important;
}

html[data-theme="emerald"] body.admin-login-page .form-heading .eyebrow,
html[data-theme="emerald"] body.admin-login-page .secure-note span {
  color: #16845a;
}

html[data-theme="emerald"] body.admin-login-page #loginForm input {
  background: #fff !important;
  color: #172019 !important;
  border-color: #d4ded8 !important;
}

html[data-theme="emerald"] body.admin-login-page #loginForm input::placeholder {
  color: #8b948f !important;
}

html[data-theme="emerald"] body.admin-login-page .password-toggle {
  color: #53635b !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-submit {
  background: linear-gradient(145deg, #16845a, #5c756a) !important;
  border-color: #82988d !important;
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(73, 101, 88, .28) !important;
}

html[data-theme="emerald"] body.admin-login-page .secure-note {
  background: #1b1f24 !important;
  border-color: #2c333a !important;
  color: #aeb7b2 !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-page-footer {
  color: #353535 !important;
}

html[data-theme="emerald"] body.admin-login-page .brand-mark {
  background: rgba(255, 255, 255, .16) !important;
  border-color: rgba(255, 255, 255, .35) !important;
  color: #fff !important;
}

html[data-theme="emerald"] body.admin-login-page .store-link {
  color: #3f6255 !important;
  background: #fff !important;
  border-color: #d3ddd7 !important;
}

/* Admin dashboard/order pages */
html[data-theme="emerald"] body.admin-page,
html[data-theme="emerald"] body.admin-orders-page {
  background: linear-gradient(180deg, #fafbf8, #edf2ee) !important;
  color: var(--ink) !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-header, .admin-card, .stat-card, .panel),
html[data-theme="emerald"] body.admin-orders-page :is(.header, .stat-card, .filters-card, .orders-card, .order-card) {
  border-color: #d4dfd8 !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-header, .header) {
  background: rgba(255, 255, 255, .92) !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-card, .stat-card, .panel),
html[data-theme="emerald"] body.admin-orders-page :is(.stat-card, .filters-card, .orders-card, .order-card) {
  background: #fff !important;
  color: var(--ink) !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-title p, .admin-card-header p, .admin-muted),
html[data-theme="emerald"] body.admin-orders-page :is(.page-heading p, .stat-card span, .order-date, .info-item span, .message) {
  color: #617068 !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-title .eyebrow, .admin-card-header .eyebrow),
html[data-theme="emerald"] body.admin-orders-page .eyebrow {
  color: #426657 !important;
}

html[data-theme="emerald"] body.admin-page :is(.btn-primary),
html[data-theme="emerald"] body.admin-orders-page .btn-primary {
  background: #557568 !important;
  color: #fff !important;
  border-color: #557568 !important;
  margin: 2% 0% 0% 0%;
}

html[data-theme="emerald"] body.admin-page :is(.btn-outline),
html[data-theme="emerald"] body.admin-orders-page .btn-outline {
  background: #fff !important;
  color: #426657 !important;
  border-color: #cedbd3 !important;
}

html[data-theme="emerald"] body.admin-orders-page .field,
html[data-theme="emerald"] body.admin-orders-page .status-tab {
  background: #fff !important;
  color: #25332c !important;
  border-color: #d1ddd6 !important;
}

html[data-theme="emerald"] body.admin-orders-page .status-tab.active {
  background: #60796d !important;
  color: #fff !important;
  border-color: #60796d !important;
}

html[data-theme="emerald"] body.admin-orders-page .order-number,
html[data-theme="emerald"] body.admin-orders-page .order-total strong {
  color: #426657 !important;
}

/* Dashboard/detail dark widgets are intentionally retained only as contrast blocks. */
html[data-theme="emerald"] body :is(.dark-panel, .admin-dark-panel) {
  background: #15181d !important;
  color: #f2f3ef !important;
}

/* Watch recolor: no gold remnants in emerald mode */
html[data-theme="emerald"] body :is(.tw-watch-face, .watch-face) {
  background: radial-gradient(circle at 34% 24%, #fff 0%, #edf3ee 58%, #d3e0d8 100%) !important;
  color: #426657 !important;
  border-color: #7f9a8e !important;
  box-shadow: 0 0 0 5px rgba(82, 112, 100, .08), 0 0 55px rgba(82, 112, 100, .14), inset 0 0 18px rgba(37, 55, 47, .12) !important;
}

html[data-theme="emerald"] body :is(.tw-watch-marker, .watch-index, .watch-number, .watch-date, .tw-watch-day, .tw-watch-brand, .tw-watch-subbrand) {
  color: #426657 !important;
}

html[data-theme="emerald"] body :is(.tw-watch-hand, .watch-hand) {
  background: #2f5143 !important;
}

html[data-theme="emerald"] body :is(.tw-watch-pin, .watch-pin, .watch-center) {
  background: #557568 !important;
  border-color: #dbe5df !important;
}

html[data-theme="emerald"] body :is(.tw-watch-strap, .watch-strap) {
  background: repeating-linear-gradient(90deg, #334e43 0 7px, #5d786c 8px 10px, #263c33 11px 16px) !important;
  border-color: #718b80 !important;
}

html[data-theme="emerald"] body :is(.tw-watch-halo, .watch-halo, .watch-orbit) {
  border-color: rgba(82, 112, 100, .28) !important;
  box-shadow: 0 0 65px rgba(82, 112, 100, .10) !important;
}

/* Prevent any old gold utility class from leaking into emerald UI */
html[data-theme="emerald"] body :is(.text-gold, .gold, .gold-text, .accent-gold, .tw-brand-gold) {
  color: #426657 !important;
}

/* =========================================================
   Final emerald parity layer — no accidental dark/gold islands
   ========================================================= */
html[data-theme="emerald"] body :is(.dark-panel, .admin-dark-panel) {
  background: #ffffff !important;
  color: #18352a !important;
  border: 1px solid #d4dfd8 !important;
  box-shadow: 0 14px 40px rgba(47, 81, 67, .08) !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-form-panel {
  background: #ffffff !important;
  color: #18352a !important;
  border-color: #d4dfd8 !important;
}

html[data-theme="emerald"] body.admin-login-page .form-heading h2,
html[data-theme="emerald"] body.admin-login-page .form-heading p,
html[data-theme="emerald"] body.admin-login-page #loginForm label {
  color: #18352a !important;
}

html[data-theme="emerald"] body.admin-login-page .form-heading p,
html[data-theme="emerald"] body.admin-login-page .secure-note,
html[data-theme="emerald"] body.admin-login-page .admin-page-footer {
  color: #5d6d64 !important;
}

html[data-theme="emerald"] body.admin-login-page .secure-note {
  background: #f1f6f2 !important;
  border-color: #d5e1da !important;
}

html[data-theme="emerald"] body.admin-login-page .secure-note span {
  color: #426657 !important;
}

html[data-theme="emerald"] body.admin-login-page .password-toggle {
  border-color: #cddbd3 !important;
  color: #426657 !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-face {
  background: radial-gradient(circle at 35% 25%, #ffffff, #edf3ee 68%) !important;
  border-color: #7f9a8e !important;
  box-shadow: 0 0 0 4px rgba(82, 112, 100, .08), 0 0 42px rgba(82, 112, 100, .14), inset 0 0 18px rgba(37, 55, 47, .10) !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-bezel {
  background: azure;
}

html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .admin-watch-strap {
  background: repeating-linear-gradient(0deg, #334e43 0, #334e43 11px, #4e6c5f 12px, #4e6c5f 14px) !important;
  border-color: #718b80 !important;
  box-shadow: inset 0 0 20px rgba(17, 37, 29, .55), 0 15px 30px rgba(47, 81, 67, .16) !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-brand,
html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-date,
html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-number,
html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-index {
  color: #426657 !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-hand {
  background: #2f5143 !important;
}

html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-pin,
html[data-theme="emerald"] body.admin-login-page .admin-detailed-watch .watch-center {
  background: #557568 !important;
  border-color: #e0e9e3 !important;
}

html[data-theme="emerald"] body.admin-page :is(.form-group input, .form-group textarea, .form-group select, .form-group input[type="file"]) {
  background: #ffffff !important;
  color: #18352a !important;
  border-color: #d1ddd6 !important;
}

html[data-theme="emerald"] body.admin-page .form-group label {
  color: #365047 !important;
}

html[data-theme="emerald"] body.admin-page .form-group input::placeholder,
html[data-theme="emerald"] body.admin-page .form-group textarea::placeholder {
  color: #8a9991 !important;
}

html[data-theme="emerald"] body.admin-page .form-group input:focus,
html[data-theme="emerald"] body.admin-page .form-group textarea:focus,
html[data-theme="emerald"] body.admin-page .form-group select:focus {
  border-color: #6f8b7f !important;
  box-shadow: 0 0 0 4px rgba(82, 112, 100, .10) !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-page thead, .admin-table th) {
  background: #557568 !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-page th, .admin-table th) {
  border-color: #d4dfd8 !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-page td, .admin-table td) {
  color: #415149 !important;
  border-color: #e2e9e4 !important;
}

html[data-theme="emerald"] body.admin-page :is(.admin-page tbody tr:hover, .admin-table tbody tr:hover) {
  background: #f6faf7 !important;
}

html[data-theme="emerald"] body.admin-page .product-image-preview img {
  background: #f5f8f5 !important;
  border-color: #d4dfd8 !important;
}

html[data-theme="emerald"] body.admin-page .admin-toast {
  color: #ffffff !important;
  background: #557568 !important;
}

html[data-theme="emerald"] body.admin-page .admin-footer {
  color: #607269 !important;
  border-color: #d4dfd8 !important;
}

html[data-theme="emerald"] body.admin-page .order-card h3 {
  color: #426657 !important;
}

html[data-theme="emerald"] body.admin-page .admin-page-footer {
  color: #607269 !important;
}

/* =========================================================
   Final theme contract — 2026
   Keep Classic and Emerald visually distinct on shared components.
   Emerald palette: #f0fff3 / #176b4b / #000000
   ========================================================= */
html[data-theme="emerald"] body :is(.watch-hand, .tw-watch-hand, .hand-hour, .hand-minute, .hand-second, [data-clock-hour], [data-clock-minute], [data-clock-second]) {
  background: #176b4b !important;
  color: #176b4b !important;
}

html[data-theme="emerald"] body :is(.watch-hand.second, .tw-watch-hand.second, [data-clock-second]) {
  background: #176b4b !important;
  color: #176b4b !important
}

html[data-theme="emerald"] body :is(.watch-center, .tw-watch-pin, .watch-center) {
  background: #176b4b !important;
  border-color: #f0fff3 !important
}

html[data-theme="emerald"] body :is(.clock-tick.major, .clock-tick) {
  background: #176b4b !important
}

html[data-theme="emerald"] body :is(.site-header, .main-header, .navbar, .topbar, .header-bar, .admin-topbar) {
  color: #000 !important;
  border-color: #b9ddc7 !important
}

html[data-theme="emerald"] body :is(.site-header a, .main-header a, .navbar a, .topbar a, .header-bar a, .admin-topbar a) {
  color: #176b4b !important
}

html[data-theme="emerald"] body :is(.admin-sidebar, .sidebar, .filters, .filter-panel, .cart-summary, .checkout-summary, .account-sidebar) {
  background: #fff !important;
  color: #000 !important;
  border-color: #b9ddc7 !important
}

html[data-theme="emerald"] body :is(.admin-content, .content, .main-content, .page-content, .account-panel, .checkout-card, .product-detail-card) {
  background: #fff !important;
  color: #000 !important;
  border-color: #b9ddc7 !important
}

html[data-theme="emerald"] body :is(.admin-table, .data-table, .table-wrap, table) {
  background: #fff !important;
  color: #000 !important;
  border-color: #b9ddc7 !important
}

html[data-theme="emerald"] body :is(table th, .admin-table th) {
  background: #f0fff3 !important;
  color: #176b4b !important;
  border-color: #b9ddc7 !important
}

html[data-theme="emerald"] body :is(table td, .admin-table td) {
  background: #fff !important;
  color: #000 !important;
  border-color: #d7eadf !important
}

html[data-theme="emerald"] body :is(.modal, .modal-content, .dialog, .dropdown-menu, .toast, .notification) {
  background: #fff !important;
  color: #000 !important;
  border-color: #b9ddc7 !important
}

html[data-theme="emerald"] body :is(.badge, .chip, .tag, .status-badge) {
  background: #dff5e6 !important;
  color: #176b4b !important;
  border-color: #b9ddc7 !important
}

html[data-theme="emerald"] body :is(.danger, .btn-danger, .delete-btn) {
  background: #fff !important;
  color: #9b2525 !important;
  border-color: #e7b8b8 !important
}

html[data-theme="emerald"] body :is(.section-title, .page-title, .admin-title, .card-title) {
  color: #000 !important
}

html[data-theme="emerald"] body :is(.section-subtitle, .subtitle, .helper-text, .muted) {
  color: #315344 !important
}

/* Classic remains intentionally dark/gold on the same shared surfaces. */
html[data-theme="classic"] body :is(.admin-content, .content, .main-content, .page-content, .account-panel, .checkout-card, .product-detail-card, .admin-card, .panel) {
  background: #11141b;
  color: #f4f1e9;
  border-color: rgba(216, 181, 107, .16)
}

html[data-theme="classic"] body :is(table, .admin-table, .data-table, .table-wrap) {
  background: #0f1218;
  color: #f4f1e9;
  border-color: rgba(216, 181, 107, .16)
}

html[data-theme="classic"] body :is(table th, .admin-table th) {
  background: #171a22;
  color: #f2d99a;
  border-color: rgba(216, 181, 107, .18)
}

html[data-theme="classic"] body :is(table td, .admin-table td) {
  background: #11141b;
  color: #e8e8ea;
  border-color: rgba(255, 255, 255, .07)
}


/* Account security card */
.account-password-card {
  margin-top: 28px;
  padding: 22px;
  border: 1px solid var(--tw-border, rgba(255, 255, 255, .12));
  border-radius: 20px;
  background: var(--tw-surface, rgba(255, 255, 255, .04));
}

.account-password-card h3 {
  margin: 0 0 8px;
}

.account-password-card>p {
  margin: 0 0 18px;
  opacity: .78;
}

body.theme-emerald .account-password-card {
  background: #f0fff3;
  border-color: rgba(23, 107, 75, .2);
  color: #000;
}

/* =========================================================
   Admin visual parity — statistics + order header
   Each theme gets its own deliberate card treatment.
   ========================================================= */
html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:nth-child(1),
html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:nth-child(2),
html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:nth-child(3),
html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:nth-child(4) {
  background: linear-gradient(145deg, #f0fff3 0%, #ffffff 72%) !important;
  border-color: #b9dcc9 !important;
  box-shadow: 0 14px 34px rgba(23, 107, 75, .08) !important;
}

html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:nth-child(1) {
  border-top: 3px solid #176b4b !important;
}

html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:nth-child(2) {
  border-top: 3px solid #2b8060 !important;
}

html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:nth-child(3) {
  border-top: 3px solid #4a9578 !important;
}

html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:nth-child(4) {
  border-top: 3px solid #0f563c !important;
}

html[data-theme="emerald"] body.admin-page .stats-grid .stat-card span {
  color: #426557 !important;
}

html[data-theme="emerald"] body.admin-page .stats-grid .stat-card strong {
  color: #176b4b !important;
}

html[data-theme="emerald"] body.admin-page .stats-grid .stat-card::after {
  border-color: rgba(23, 107, 75, .10) !important;
}

html[data-theme="emerald"] body.admin-page .stats-grid .stat-card:hover {
  border-color: #176b4b !important;
  box-shadow: 0 18px 40px rgba(23, 107, 75, .13) !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card:nth-child(1),
html[data-theme="classic"] body.admin-page .stats-grid .stat-card:nth-child(2),
html[data-theme="classic"] body.admin-page .stats-grid .stat-card:nth-child(3),
html[data-theme="classic"] body.admin-page .stats-grid .stat-card:nth-child(4) {
  background: linear-gradient(145deg, #171b24 0%, #11141b 74%) !important;
  border-color: rgba(216, 181, 107, .14) !important;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .24) !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card:nth-child(1) {
  border-top: 3px solid #f2d99a !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card:nth-child(2) {
  border-top: 3px solid #d8b56b !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card:nth-child(3) {
  border-top: 3px solid #c49a4d !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card:nth-child(4) {
  border-top: 3px solid #a97935 !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card span {
  color: #9296a1 !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card strong {
  color: #f2d99a !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card::after {
  border-color: rgba(216, 181, 107, .10) !important;
}

html[data-theme="classic"] body.admin-page .stats-grid .stat-card:hover {
  border-color: rgba(216, 181, 107, .34) !important;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .30) !important;
}

/* admin-orders header mirrors the admin dashboard header in both themes */
html[data-theme="emerald"] body.admin-orders-page .header {
  min-height: 78px;
  background: rgba(255, 255, 255, .92) !important;
  border-bottom: 1px solid #d4dfd8 !important;
  box-shadow: 0 8px 28px rgba(23, 107, 75, .05) !important;
}

html[data-theme="emerald"] body.admin-orders-page .header .logo {
  color: #111 !important;
}

html[data-theme="emerald"] body.admin-orders-page .header .logo span {
  color: #176b4b !important;
}

html[data-theme="classic"] body.admin-orders-page .header {
  min-height: 78px;
  background: rgba(9, 11, 15, .92) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .09) !important;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .20) !important;
}

html[data-theme="classic"] body.admin-orders-page .header .logo {
  color: #f4f1e9 !important;
}

html[data-theme="classic"] body.admin-orders-page .header .logo span {
  color: #f2d99a !important;
}

/* New feature controls — retain the legacy layout while using the refreshed Emerald palette. */
.tw-postal-lookup-group { display:flex; flex-direction:column; align-items:stretch; gap:7px; }
.tw-postal-lookup-button {
  width:fit-content; min-height:35px; padding:7px 13px;
  border:1px solid rgba(38,107,75,.35); border-radius:9px;
  background:linear-gradient(135deg,#3ca97d,#357c62);
  color:#fff; font:inherit; font-size:11px; font-weight:800; cursor:pointer;
}
.tw-postal-lookup-button:disabled { opacity:.6; cursor:wait; }
.tw-postal-lookup-status { display:block; min-height:17px; margin-top:3px; color:var(--muted,#748178); font-size:10px; line-height:1.8; }
.tw-postal-lookup-status.is-success { color:#28734f !important; }
.tw-postal-lookup-status.is-error { color:#a33f3f !important; }
