@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,400;0,600;0,700;1,400&family=Playfair+Display:ital,wght@0,600;1,600&family=Quicksand:wght@500;600;700&display=swap');

/* ==========================================================================
   Yoga for Heart — Admin theme
   Re-skins the admin app to match the public site's "Gentle Healing" look:
   soft rose & blush, Quicksand headings + Nunito body, rounded and friendly.

   Strategy: this file re-defines the same CSS variable names the admin pages
   already use (--bg, --card, --ink, --muted, --blue, --green, ...) but mapped
   to the rose palette, so existing markup adopts the new look automatically.
   It is linked AFTER each page's inline <style>, so it wins the cascade.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens — light (default)
   -------------------------------------------------------------------------- */
:root {
	/* Surfaces */
	--bg:          #FDFBF9;   /* ivory */
	--card:        #ffffff;
	--card2:       #FDFBF9;
	--card-border: #E7D6D2;   /* line */
	--border:      #E7D6D2;   /* alias of card-border */
	--ink:         #3A2F32;   /* text */
	--text:        #3A2F32;   /* alias of ink */
	--muted:       #6B5A5E;
	--header-bg:   rgba(253, 251, 249, 0.92);
	--btn-hover-bg:#F6E7E4;   /* blush */
	--input-bg:    #ffffff;
	--disabled:    #E7D6D2;

	/* Accents — the app's "blue" becomes the site rose so primary actions,
	   active tabs and pills all read as on-brand. */
	--blue:         #A94E5E;  /* rose-deep */
	--blue-ink:     #ffffff;
	--blue-strong:  #8C3D4C;  /* rose-dark */
	--accent:       #A94E5E;  /* rose-deep */
	--green:        #2E6B3A;
	--red:          #C0392B;
	--red-ink:      #ffffff;
	--red-velvet:   #C0392B;
	--amber:        #B4682B;
	--magenta:      #A94E5E;
	--magenta-soft: #C98A8A;
	--indigo:       #8C3D4C;
	--chip:         #F6E7E4;
	--chip-border:  #E7D6D2;

	/* Site tokens (used by the reskinned chrome) */
	--ivory:     #FDFBF9;
	--blush:     #F6E7E4;
	--blush-deep:#EFD6D2;
	--rose:      #D69A9A;
	--rose-deep: #A94E5E;
	--rose-dark: #8C3D4C;
	--plum:      #4A343B;
	--heart-red: #C0392B;
	--line:      #E7D6D2;

	/* Type + shape */
	--font-head: 'Quicksand', system-ui, sans-serif;
	--font-body: 'Nunito', system-ui, -apple-system, sans-serif;
	--radius:    18px;
	--radius-sm: 12px;
	--shadow:    0 10px 30px rgba(74, 52, 59, 0.10);
	--shadow-sm: 0 4px 14px rgba(74, 52, 59, 0.08);
}

/* --------------------------------------------------------------------------
   Design tokens — dark
   Follows the operating system's appearance automatically (like the public
   site): light during the day, dark in the evening when the OS is set to
   Auto. No manual toggle — the OS is the single source of truth.
   -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
	:root {
		--bg:          #1a1416;
		--card:        #241a1d;
		--card2:       #2c2024;
		--card-border: #3a2c30;
		--border:      #3a2c30;
		--ink:         #ece0e2;
		--text:        #ece0e2;
		--muted:       #c3aeb2;
		--header-bg:   rgba(26, 20, 22, 0.92);
		--btn-hover-bg:#2c2024;
		--input-bg:    #2c2024;
		--disabled:    #3a2c30;

		--blue:         #e79aa6;
		--blue-ink:     #3a1f25;
		--blue-strong:  #f2b6c0;
		--accent:       #e79aa6;
		--green:        #9fd6a8;
		--red:          #f0a8a8;
		--red-ink:      #3a1f25;
		--red-velvet:   #f0a8a8;
		--amber:        #e0a06a;
		--magenta:      #e79aa6;
		--magenta-soft: #f2b6c0;
		--indigo:       #f2b6c0;
		--chip:         #2c2024;
		--chip-border:  #3a2c30;

		--blush:     #2c2024;
		--blush-deep:#33282c;
		--rose:      #d99ea0;
		--rose-deep: #e79aa6;
		--rose-dark: #f2b6c0;
		--plum:      #f4e6e8;
		--line:      #3a2c30;
	}
}

/* --------------------------------------------------------------------------
   Base typography — match the public site
   -------------------------------------------------------------------------- */
body {
	font-family: var(--font-body) !important;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	line-height: 1.6;
}

h1, h2, h3, h4 {
	font-family: var(--font-head);
	color: var(--plum);
}

a { color: var(--rose-deep); }
a:hover { color: var(--rose-dark); }

:focus-visible {
	outline: 3px solid var(--rose-deep);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Header / nav — matches yoga4heart.com exactly (logo left, nav right,
   hamburger on mobile). Markup: partials/header.php
   -------------------------------------------------------------------------- */
.site-header {
	display: block;
	padding: 0;
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--header-bg);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}
.site-header .container {
	width: min(100% - 2.5rem, var(--container, 1120px));
	margin-inline: auto;
}
.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 0.6rem 0;
	min-height: 3.6rem;
	box-sizing: border-box;
}
.site-header .brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--plum);
}
.site-header .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.site-header .brand-name { font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: 1.9rem; color: var(--plum); }
.site-header .brand-name em { color: var(--rose-deep); font-style: italic; font-weight: inherit; }

.primary-nav ul {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}
.primary-nav a {
	display: block;
	padding: 0.6rem 0.9rem;
	border-radius: 999px;
	color: var(--ink, var(--text, #3A2F32));
	text-decoration: none;
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 1rem;
}
.primary-nav a:hover { background: var(--blush); color: var(--plum); }
.primary-nav a[aria-current="page"] { color: var(--rose-deep); background: var(--blush); }
.nav-cta a {
	background: var(--btn-bg, #D69A9A);
	color: var(--btn-fg, #4A343B);
	margin-left: 0.35rem;
}
.nav-cta a:hover { background: var(--btn-hover-bg, #C98A8A); color: var(--btn-fg, #4A343B); }

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 48px;
	height: 48px;
	background: transparent;
	border: 2px solid var(--line);
	border-radius: 12px;
	cursor: pointer;
}
.nav-toggle-bar {
	display: block;
	width: 22px;
	height: 2px;
	margin-inline: auto;
	background: var(--plum);
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
	.nav-toggle { display: flex; }
	.primary-nav {
		position: absolute;
		left: 0; right: 0; top: 100%;
		background: var(--surface, var(--bg, #ffffff));
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow, 0 10px 30px rgba(74, 52, 59, 0.10));
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.28s ease;
	}
	.primary-nav.open { max-height: 32rem; }
	.primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem; }
	.primary-nav a { padding: 0.9rem 1rem; border-radius: var(--radius-sm, 12px); font-size: 1.1rem; }
	.nav-cta a { margin: 0.35rem 0 0; text-align: center; }
}

/* --------------------------------------------------------------------------
   Cards, sections, separators
   -------------------------------------------------------------------------- */
.card,
.student-card {
	background: var(--card) !important;
	border: 1px solid var(--card-border) !important;
	border-radius: var(--radius) !important;
	box-shadow: var(--shadow-sm);
}
.section-head,
.section-title,
.page-title,
.week-title {
	font-family: var(--font-head);
	color: var(--muted);
}
.page-head .title { font-family: var(--font-head); color: var(--plum); }
.sep, .hr { background: var(--card-border); border-color: var(--card-border); }

/* --------------------------------------------------------------------------
   Buttons — rounded, rose-forward
   -------------------------------------------------------------------------- */
.btn,
button:not(.mode-btn):not(.tab):not(.nav-toggle) {
	font-family: var(--font-head);
}
.btn {
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--btn-hover-bg);
	color: var(--ink);
	font-weight: 700;
	cursor: pointer;
}
.btn:hover { background: var(--blush-deep); }
.btn.blue,
.btn-mini.pay {
	background: var(--rose-deep) !important;
	color: #fff !important;
	border-color: var(--rose-deep) !important;
}
.btn.blue:hover,
.btn-mini.pay:hover {
	background: var(--rose-dark) !important;
	border-color: var(--rose-dark) !important;
	color: #fff !important;
}
.btn.green {
	background: rgba(46, 107, 58, 0.12) !important;
	color: var(--green) !important;
	border-color: rgba(46, 107, 58, 0.3) !important;
}
.btn.red {
	background: rgba(192, 57, 43, 0.12) !important;
	color: var(--red) !important;
	border-color: rgba(192, 57, 43, 0.3) !important;
}

/* Primary submit buttons on login / add-forms (blue fills) → rose */
.add-row button,
.pin-submit,
.login-submit {
	background: var(--rose-deep) !important;
	color: #fff !important;
}

/* CTA pills on the classes cards */
.cta-reopen { background: var(--rose-deep) !important; }
.cta-reopen:hover { background: var(--rose-dark) !important; }
.cta-text.reopen { color: var(--rose-deep) !important; }
.cta-text.reopen:hover { color: var(--rose-dark) !important; }

/* --------------------------------------------------------------------------
   Inputs
   -------------------------------------------------------------------------- */
.input, .input-mini,
input[type="text"], input[type="password"], input[type="number"], input[type="tel"],
select, textarea {
	border-radius: var(--radius-sm);
	border: 1px solid var(--card-border);
	background: var(--input-bg);
	color: var(--ink);
	font-family: var(--font-body);
}
.input:focus, .input-mini:focus,
input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--rose);
	box-shadow: 0 0 0 3px rgba(169, 78, 94, 0.15);
}

/* --------------------------------------------------------------------------
   Status pills / badges — keep semantic colors but soften to the palette
   -------------------------------------------------------------------------- */
.status.active,
.status-active,
.badge.open {
	background: rgba(46, 107, 58, 0.12);
	color: var(--green);
	border-color: rgba(46, 107, 58, 0.28);
}
.status.inactive,
.status-inactive {
	background: rgba(107, 90, 94, 0.12);
	color: var(--muted);
	border-color: rgba(107, 90, 94, 0.28);
}
.badge.full {
	background: rgba(192, 57, 43, 0.12);
	color: var(--red-velvet);
	border-color: rgba(192, 57, 43, 0.28);
}

/* --------------------------------------------------------------------------
   Flash / error banners
   -------------------------------------------------------------------------- */
.flash, .flash.success {
	border-radius: var(--radius-sm);
	border: 1px solid #CDE6D2;
	background: var(--success-bg, #E4F1E6);
	color: var(--success-fg, #2E6B3A);
}
.error, .flash.danger {
	border-radius: var(--radius-sm);
	border: 1px solid #F1C7C7;
	background: var(--error-bg, #FBE4E4);
	color: var(--error-fg, #9E2A2A);
}
.err { color: var(--error-fg, #9E2A2A); }

/* --------------------------------------------------------------------------
   Login screen
   -------------------------------------------------------------------------- */
.login-card .pin input,
.pin input {
	background: var(--input-bg);
	color: var(--ink);
	border: 1px solid var(--card-border);
	border-radius: var(--radius-sm);
}
.login-card button[type="submit"],
.wrap .card button[type="submit"] {
	background: var(--rose-deep);
	color: #fff;
	border-radius: 999px;
	font-family: var(--font-head);
	font-weight: 700;
}
.login-card button[type="submit"]:hover,
.wrap .card button[type="submit"]:hover { background: var(--rose-dark); }

/* --------------------------------------------------------------------------
   Footer (partials/footer.php)
   -------------------------------------------------------------------------- */
.admin-footer {
	text-align: center;
	padding: 1.5rem 16px;
	color: var(--muted);
	font-size: 0.85rem;
	border-top: 1px solid var(--line);
	margin-top: 2rem;
}
.admin-footer a { color: var(--rose-deep); }
