@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap');

:root {
    --bg-start: #1c4b75;
    --bg-end: #0f152d;
    --card: rgba(33, 40, 64, 0.92);
    --card-strong: rgba(20, 27, 48, 0.96);
    --primary: #4095bf;
    --primary-hover: #357ca0;
    --green: #2ecc71;
    --red: #ef4444;
    --yellow: #f59e0b;
    --text: #ffffff;
    --muted: #b0b8c4;
    --line: rgba(255, 255, 255, 0.13);
    --input: rgba(255, 255, 255, 0.09);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
    --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Roboto', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 12%, rgba(64, 149, 191, 0.32), transparent 28%),
        radial-gradient(circle at 85% 0%, rgba(46, 204, 113, 0.18), transparent 25%),
        linear-gradient(135deg, var(--bg-start), var(--bg-end));
}

a { color: #84d4ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.app-shell { width: min(1180px, 100%); margin: 0 auto; padding: 28px; }
.public-layout { display: grid; gap: 24px; }

.glass-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-card { padding: 28px; }
.nav-bar, .hero-content, .brand-mark, .admin-header, .checkout-actions { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand-mark { justify-content: flex-start; }
.brand-mark strong { display: block; font-size: 1.1rem; }
.brand-mark small { display: block; color: var(--muted); }
.brand-dot { width: 18px; height: 18px; border-radius: 999px; background: linear-gradient(135deg, #19c37d, var(--primary)); box-shadow: 0 0 0 7px rgba(64,149,191,0.14); }
.ghost-link, .btn-secondary { color: var(--text); background: rgba(255,255,255,0.08); border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; }

.pill { display: inline-flex; width: fit-content; padding: 7px 12px; border-radius: 999px; color: #dff8ff; background: rgba(64,149,191,0.18); border: 1px solid rgba(64,149,191,0.35); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.muted-pill { color: var(--muted); background: rgba(255,255,255,0.07); border-color: var(--line); }

.hero-content { align-items: stretch; margin-top: 34px; }
.hero-content h1 { max-width: 760px; margin: 12px 0; font-size: clamp(2rem, 4vw, 4.2rem); line-height: .96; letter-spacing: -0.06em; }
.hero-content p { max-width: 700px; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.secure-card { min-width: 250px; padding: 22px; border-radius: 22px; background: linear-gradient(160deg, rgba(64,149,191,.35), rgba(46,204,113,.18)); border: 1px solid var(--line); }
.secure-card span, .secure-card small { color: var(--muted); display: block; }
.secure-card strong { display: block; margin: 10px 0; font-size: 2.4rem; }

.public-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) 360px; gap: 24px; align-items: start; }
.form-card, .summary-card, .admin-section, .checkout-card, .login-card { padding: 26px; }
.section-heading h2 { margin: 10px 0 6px; font-size: 1.8rem; }
.section-heading p, .mini-copy { color: var(--muted); line-height: 1.6; }

.well-form { display: grid; gap: 16px; }
.form-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; font-size: .92rem; }
input, select, textarea {
    width: 100%; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); color: var(--text); font: inherit; outline: none;
}
select option { color: #111827; }
textarea { resize: vertical; min-height: 92px; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(64,149,191,.16); }
::placeholder { color: rgba(255,255,255,.38); }

.choice-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice-card { cursor: pointer; }
.choice-card input { display: none; }
.choice-card span { display: block; text-align: center; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--input); color: var(--muted); }
.choice-card input:checked + span { color: var(--text); border-color: var(--primary); background: rgba(64,149,191,.22); box-shadow: 0 0 20px rgba(64,149,191,.18); }

.payment-method-card, .consent-box { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.06); }
.payment-method-card strong, .payment-method-card span { display: block; }
.payment-method-card span { color: var(--muted); margin-top: 4px; }
.consent-box { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; line-height: 1.55; }
.consent-box input { width: 20px; min-width: 20px; margin-top: 2px; accent-color: var(--primary); }

.btn-primary, .btn-secondary { border: 0; cursor: pointer; text-decoration: none; transition: transform .14s ease, opacity .14s ease; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 15px 18px; border-radius: 14px; color: #fff; background: var(--primary); font-weight: 900; font-size: 1rem; box-shadow: 0 12px 28px rgba(64,149,191,.26); }
.btn-primary:hover, .btn-secondary:hover { transform: translateY(-1px); opacity: .92; text-decoration: none; }

.summary-card { position: sticky; top: 24px; }
.summary-card h2 { margin: 12px 0 22px; }
.summary-line, .summary-total { display: flex; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.summary-line span, .summary-total span { color: var(--muted); }
.summary-total { margin-top: 8px; border-bottom: 0; font-size: 1.25rem; }
.summary-total strong { color: var(--green); }
.notice { padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); }
.notice.warning { background: rgba(245,158,11,.14); color: #fde68a; }
.notice.danger { background: rgba(239,68,68,.15); color: #fecaca; }
.notice.success { background: rgba(46,204,113,.14); color: #bbf7d0; }

.center-page { display: grid; place-items: center; padding: 28px; }
.login-card, .checkout-card { width: min(720px, 100%); }
.login-card h1, .checkout-card h1 { margin-bottom: 8px; }
.checkout-summary { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.checkout-summary div { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.06); }
.checkout-summary span { display: block; color: var(--muted); margin-bottom: 6px; }
.checkout-summary .total-row { grid-column: 1 / -1; }
.checkout-summary .total-row strong { color: var(--green); font-size: 1.5rem; }
.checkout-actions .btn-primary, .checkout-actions .btn-secondary { width: auto; min-width: 180px; }

.admin-shell { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; padding: 22px; }
.admin-sidebar { position: sticky; top: 22px; align-self: start; min-height: calc(100vh - 44px); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.admin-sidebar a { padding: 12px 14px; border-radius: 12px; color: var(--muted); }
.admin-sidebar a:hover { background: rgba(255,255,255,.07); color: var(--text); text-decoration: none; }
.admin-sidebar form { margin-top: auto; }
.admin-main { display: grid; gap: 20px; }
.admin-header { padding: 24px; }
.admin-header h1 { margin: 10px 0; font-size: clamp(1.8rem, 3vw, 3rem); }
.admin-header p { color: var(--muted); }
.admin-header > strong { color: var(--green); font-size: 2rem; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { padding: 18px; }
.metric-card span { color: var(--muted); display: block; }
.metric-card strong { display: block; margin-top: 8px; font-size: 2rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
td small { color: var(--muted); }
.status-pill { display: inline-flex; padding: 6px 10px; border-radius: 999px; font-size: .78rem; font-weight: 900; }
.status-created, .status-pending { background: rgba(245,158,11,.18); color: #fde68a; }
.status-approved { background: rgba(46,204,113,.18); color: #bbf7d0; }
.status-rejected, .status-canceled { background: rgba(239,68,68,.18); color: #fecaca; }
.status-refunded { background: rgba(64,149,191,.18); color: #bfdbfe; }

.therapy-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.therapy-edit-card { display: grid; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.055); }
.therapy-edit-card h3 { margin: 0 0 6px; }

@media (max-width: 980px) {
    .public-grid, .admin-shell, .hero-content, .admin-header { grid-template-columns: 1fr; display: grid; }
    .admin-sidebar, .summary-card { position: static; min-height: auto; }
    .metric-grid, .therapy-admin-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 640px) {
    .app-shell, .admin-shell { padding: 14px; }
    .form-two, .choice-row, .checkout-summary, .metric-grid, .therapy-admin-grid { grid-template-columns: 1fr; }
    .hero-card, .form-card, .summary-card, .admin-section, .checkout-card, .login-card { padding: 18px; border-radius: 18px; }
    .nav-bar, .checkout-actions { flex-direction: column; align-items: stretch; }
    th, td { min-width: 140px; }
}

.inline-form {
    display: inline-flex;
    margin-left: 10px;
}

.link-button {
    background: transparent;
    border: 0;
    color: #7dd3fc;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

.link-button:hover {
    color: #bae6fd;
}