/*
 * Saarathi glass appearance — v1.0, 22 October 2026
 * Load AFTER assets/css/style.css. Keep the original stylesheet.
 * Matches the Saarathi 3.41 public pages and CRM admin classes.
 */

:root {
  --sg-panel: #fcfafc;
  --sg-panel-strong: #fffdfd;
  --sg-nav: #fcfafc;
  --sg-dark: #302332;
  --sg-hero: rgba(28, 18, 29, .62);
  --sg-edge: rgba(130, 91, 117, .17);
  --sg-shadow: 0 10px 28px rgba(71, 38, 59, .075),
    inset 0 1px 0 rgba(255, 255, 255, .9);
  --sg-blur: 16px;
}

/* Solid surfaces above are the fallback when backdrop blur is unavailable. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --sg-panel: rgba(255, 255, 255, .72);
    --sg-panel-strong: rgba(255, 253, 254, .93);
    --sg-nav: rgba(255, 251, 253, .83);
    --sg-dark: rgba(48, 35, 50, .91);
    --sg-hero: rgba(28, 18, 29, .28);
  }
}

body,
body[data-admin-page="1"] {
  background-color: #f4f1f5;
  background-image:
    radial-gradient(ellipse at 5% 5%, rgba(197, 137, 166, .2), transparent 46%),
    radial-gradient(ellipse at 96% 24%, rgba(176, 204, 218, .23), transparent 43%),
    linear-gradient(135deg, #faf5f7, #f1f2f8 55%, #faf5ee);
  background-repeat: no-repeat;
  background-size: 100% 1800px;
}

body .home-stats-section,
body .login-page {
  background: transparent;
}

/* Main navigation. Its existing position, menu behavior and sizes are kept. */
body .site-nav {
  background: var(--sg-nav);
  border-bottom-color: var(--sg-edge);
  box-shadow: 0 5px 22px rgba(64, 33, 54, .045);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  backdrop-filter: blur(20px) saturate(120%);
}

body .lang-switch,
body .site-nav .nav-toggle {
  background: var(--sg-panel-strong);
  border-color: var(--sg-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9),
    0 3px 10px rgba(71, 38, 59, .05);
}

/* Glass over the existing home slider. The photos themselves are untouched. */
body .hero-slider .hero-copy {
  padding: clamp(20px, 3.5vw, 42px);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 28px;
  background: var(--sg-hero);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15),
    0 16px 40px rgba(17, 10, 20, .14);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Public cards and form panels. No grid columns or card sizes are changed. */
body .tile,
body .form-card,
body .filter-card,
body .login-card,
body .admin-login-page .login-card,
body .profile-card,
body .recent-member-card,
body .event-card,
body .service-box,
body .provider-card,
body .provider-list-card,
body .provider-filters,
body .provider-contact-card,
body .review-card,
body .admin-image-card,
body .metric,
body .home-stat-card,
body .admin-link,
body .table-wrap {
  border: 1px solid var(--sg-edge);
  background: var(--sg-panel);
  box-shadow: var(--sg-shadow);
  -webkit-backdrop-filter: blur(var(--sg-blur)) saturate(115%);
  backdrop-filter: blur(var(--sg-blur)) saturate(115%);
}

/* The VAS stylesheet has important shadows, so this override needs one too. */
body .value-added-page .value-category-card {
  border-color: var(--sg-edge);
  background: var(--sg-panel);
  box-shadow: var(--sg-shadow) !important;
  -webkit-backdrop-filter: blur(var(--sg-blur)) saturate(115%);
  backdrop-filter: blur(var(--sg-blur)) saturate(115%);
}

/* Keep dark and rose feature cards readable against their own backgrounds. */
body .tile.dark,
body .tile.soft-dark {
  background: var(--sg-dark);
  border-color: rgba(255, 255, 255, .2);
  color: #fff;
  box-shadow: 0 12px 30px rgba(46, 23, 42, .12),
    inset 0 1px 0 rgba(255, 255, 255, .16);
}

body .tile.dark p,
body .tile.soft-dark p {
  color: #eee5ed;
}

body :is(.tile.dark, .tile.soft-dark) .eyebrow { color: #f1cfdf; }

body .home-stat-note,
body .recent-member-meta dt { color: #69616b; }

body .tile.blush {
  background: linear-gradient(135deg, rgba(255, 252, 253, .95), rgba(242, 220, 231, .88));
}

body .detail,
body .plan-card {
  background: rgba(255, 255, 255, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

body .plan-radio input:checked + .plan-card {
  background: #fff5f9;
  border-color: var(--accent, #7b173c);
  box-shadow: 0 0 0 2px rgba(123, 23, 60, .08);
}

/* Form controls stay clear and retain native date/select/checkbox behavior. */
body input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
body select,
body textarea {
  background: var(--sg-panel-strong);
  border-color: rgba(130, 91, 117, .26);
  box-shadow: inset 0 1px 2px rgba(71, 38, 59, .025);
  color: #302b33;
}

body select option {
  background: #fffdfd;
  color: #302b33;
}

body :is(input, select, textarea):focus-visible {
  outline: 2px solid var(--accent, #7b173c);
  outline-offset: 2px;
  box-shadow: none;
}

/* Existing red/green/gold/blue action colors are retained. */
body .btn {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2),
    0 5px 12px rgba(71, 38, 59, .1);
}

body .btn.secondary,
body .recent-member-actions .btn.secondary {
  background: var(--sg-panel-strong);
  border-color: rgba(130, 91, 117, .24);
  color: #623149;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9),
    0 3px 9px rgba(71, 38, 59, .055);
}

body .hero-actions .btn.secondary {
  background: rgba(255, 255, 255, .91);
  border-color: rgba(255, 255, 255, .7);
  color: #452335;
}

body .btn:focus-visible {
  outline: 2px solid var(--accent, #7b173c);
  outline-offset: 3px;
}

/* Table tint is light enough for long lists and payment information. */
body .table th {
  background: rgba(242, 229, 237, .86);
  color: #573b4b;
}

body .table td,
body .table th {
  border-bottom-color: rgba(130, 91, 117, .12);
}

body .table tr:nth-child(2n) td {
  background: rgba(255, 255, 255, .36);
}

/* Match the existing admin selectors without changing the CRM layout. */
body[data-admin-page="1"] .admin-metrics .metric:nth-child(n),
body[data-admin-page="1"] .admin-link:nth-child(n) {
  background: var(--sg-panel);
  border-color: var(--sg-edge);
  box-shadow: var(--sg-shadow);
}

body[data-admin-page="1"] .crm-sidebar,
body[data-admin-page="1"] .crm-toolbar {
  background: var(--sg-panel-strong);
  border-color: var(--sg-edge);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  backdrop-filter: blur(18px) saturate(115%);
}

body[data-admin-page="1"] .crm-menu-button {
  background: rgba(255, 255, 255, .56);
  border-color: var(--sg-edge);
  color: #4a3444;
}

body[data-admin-page="1"] .crm-menu-button.is-active {
  background: linear-gradient(135deg, #a33763, #7b173c);
  border-color: #8c2850;
  color: #fff;
  box-shadow: 0 4px 12px rgba(123, 23, 60, .16);
}

/* Dialogs use a stronger surface so their text stays legible over the page. */
body .enquiry-modal,
body .popup-card {
  background: var(--sg-panel-strong);
  border: 1px solid var(--sg-edge);
}

body .site-footer {
  background: var(--sg-dark);
  border-top: 1px solid rgba(255, 255, 255, .14);
}

body .site-footer .footer-grid a,
body .site-footer .footer-grid p,
body .site-footer .footer-intro p {
  color: #d3c7d3;
}

body .site-footer .footer-bottom {
  border-top-color: rgba(255, 255, 255, .15);
  color: #c0b2c0;
}

@media (max-width: 980px) {
  body .site-nav .nav-links,
  body .site-nav .nav-links.open {
    background: var(--sg-panel-strong);
    border-color: var(--sg-edge);
    box-shadow: 0 12px 30px rgba(71, 38, 59, .12),
      inset 0 1px 0 rgba(255, 255, 255, .9);
    -webkit-backdrop-filter: blur(20px) saturate(115%);
    backdrop-filter: blur(20px) saturate(115%);
  }
}

@media (max-width: 760px) {
  :root { --sg-blur: 10px; }
  body .hero-slider .hero-copy { border-radius: 22px; }
}

@media (hover: hover) and (pointer: fine) {
  body .value-added-page .value-category-card:hover {
    border-color: rgba(123, 23, 60, .34);
    box-shadow: 0 12px 28px rgba(71, 38, 59, .11),
      inset 0 1px 0 rgba(255, 255, 255, .9) !important;
  }
  body .btn.secondary:hover,
  body .recent-member-actions .btn.secondary:hover {
    background: #fff8fb;
    box-shadow: 0 5px 12px rgba(71, 38, 59, .085);
  }
  body .table tr:hover td { background: rgba(250, 233, 241, .8); }
  body[data-admin-page="1"] .crm-menu-button:not(.is-active):hover {
    background: #f7eaf1;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :root {
    --sg-panel: #fcfafc;
    --sg-panel-strong: #fffdfd;
    --sg-nav: #fcfafc;
    --sg-dark: #302332;
    --sg-hero: rgba(28, 18, 29, .86);
    --sg-blur: 0px;
  }
  body .site-nav,
  body .site-nav .nav-links,
  body .site-nav .nav-links.open,
  body .hero-slider .hero-copy,
  body[data-admin-page="1"] .crm-sidebar,
  body[data-admin-page="1"] .crm-toolbar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  body .tile.blush { background: #f7e8ef; }
  body .detail, body .plan-card { background: #faf5f8; }
}
