/* ============================================================================
   Clubora — design tokens & core primitives
   Πηγή: "Padel courts booking app/design_handoff_clubora/README.md".
   Τα χρώματα, τα μεγέθη και οι αποστάσεις εδώ είναι το συμβόλαιο του design —
   μην τα ξαναγράφεις inline μέσα στα components, χρησιμοποίησε τις μεταβλητές.
   ============================================================================ */

:root {
	/* — Accent — */
	--a: oklch(0.80 0.14 80);
	--a2: oklch(0.80 0.14 165);
	--a-soft: oklch(0.80 0.14 80 / 0.14);
	--a2-soft: oklch(0.80 0.14 165 / 0.12);
	--a-line: oklch(0.80 0.14 80 / 0.32);
	--on-a: #16130C;

	/* — Επιφάνειες — */
	--bg: #0A0A0B; /* admin + mobile v1 */
	--bg-app: #08080A; /* mobile v2 */
	--surface: #131316;
	--surface-raised: #1A1A1E;
	--nav-bg: #0C0C0E;
	--sidebar-bg: #0E0E11;
	--modal-bg: #111114;

	/* — Γραμμές — */
	--hairline: #1D1D21; /* admin + mobile v1 */
	--hairline-app: #17171B; /* mobile v2 */
	--border: #26262B;
	--border-strong: #2E2E36;

	/* — Κείμενο — */
	--text: #F4F3F1;
	--text-2: #C9C8C4;
	--text-muted: #8A8A92;
	--text-dim: #66666E;
	--text-dim-app: #5A5A62;
	--text-faint: #4A4A52;
	--text-faint-app: #3A3A42;

	--avatar-bg: #2A2A30;

	/* — Γεμίσματα — */
	--wash-accent: linear-gradient(160deg, #17150F 0%, #0A0A0B 88%);
	--fill-maintenance: repeating-linear-gradient(135deg, #1A1A1E 0 6px, #131316 6px 12px);
	--wash-plan: linear-gradient(150deg, #1E1B12 0%, #131316 100%);

	/* — Heatmap ramp (αναφορές), low → high — */
	--heat-0: #1A1A1E;
	--heat-1: #22221F;
	--heat-2: #2A2A22;
	--heat-3: #3B3524;
	--heat-4: #6E5C22;
	--heat-5: #A98A24;
	--heat-6: oklch(0.80 0.14 80);

	/* — Typography — */
	--font-ui: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;

	/* — Radii — */
	--r-pill: 999px;
	--r-card: 16px;
	--r-input: 14px;
	--r-chip: 12px;
	--r-chip-sm: 10px;
	--r-block: 8px;
	--r-modal: 20px; /* admin — mobile: 18px */
	--r-nav: 11px;

	/* — Shadows — */
	--sh-cta: 0 8px 24px oklch(0.80 0.14 80 / 0.3);
	--sh-window: 0 30px 80px rgba(0, 0, 0, 0.55);
	--sh-modal: 0 40px 100px rgba(0, 0, 0, 0.7);

	/* — Γεωμετρία admin shell — */
	--sidebar-w: 244px;
	--topbar-h: 68px;
	--content-px: 28px;
	--calendar-hour-h: 44px; /* μία ώρα = 44px στο ημερολόγιο, μη το αλλάξεις μονομερώς */
	--calendar-gutter-w: 66px;

	/* — Transitions — 150–200ms για state, 250ms για modal. Χωρίς διακοσμητική κίνηση. */
	--t-state: 160ms ease-out;
	--t-modal: 250ms ease-out;
}

/* ── Reset / base ─────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-ui);
	font-size: 13px;
	font-weight: 500;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a {
	color: var(--a);
	text-decoration: none;
}

button {
	font-family: inherit;
	cursor: pointer;
}

/* Κάθε αριθμός — ημερομηνίες, ώρες, τιμές, επίπεδα, κωδικοί — σε mono.
   Είναι σκόπιμος κανόνας του design, όχι προτίμηση. */
.c-num {
	font-family: var(--font-mono);
	font-feature-settings: 'tnum' 1;
}

.material-symbols-rounded {
	font-variation-settings: 'opsz' 24, 'wght' 300, 'FILL' 0, 'GRAD' 0;
	font-size: 20px;
	line-height: 1;
	user-select: none;
}

/* ── Admin shell ──────────────────────────────────────────────────────────── */

.c-shell {
	display: flex;
	min-height: 100vh;
}

.c-sidebar {
	width: var(--sidebar-w);
	flex: none;
	display: flex;
	flex-direction: column;
	background: var(--sidebar-bg);
	border-right: 1px solid var(--hairline);
	padding: 18px 14px;
	gap: 18px;
}

.c-sidebar__brand {
	display: flex;
	align-items: center;
	gap: 10px;
}

.c-logo {
	display: grid;
	place-items: center;
	background: var(--a);
	color: var(--on-a);
	font-family: var(--font-ui);
	font-weight: 800;
	/* Το σήμα είναι το γράμμα "c" σε accent στρογγυλεμένο τετράγωνο, radius ≈ 0.30 × μέγεθος. */
	width: 28px;
	height: 28px;
	border-radius: 8px;
	font-size: 17px;
	line-height: 1;
}

.c-sidebar__wordmark {
	font-weight: 800;
	font-size: 17px;
	letter-spacing: -0.03em;
}

.c-sidebar__caption {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text-dim);
}

.c-sidebar__nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
}

.c-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: var(--r-nav);
	color: #E6E5E1;
	font-size: 13.5px;
	font-weight: 600;
	transition: background var(--t-state);
}

.c-nav-item .material-symbols-rounded {
	font-size: 20px;
	color: var(--text-2);
}

.c-nav-item:hover {
	background: var(--surface);
}

/* Τίποτα στο μενού δεν είναι γκριζαρισμένο — μόνο το ενεργό ξεχωρίζει. */
.c-nav-item.active {
	background: var(--a-soft);
	box-shadow: inset 0 0 0 1px var(--a-line);
	color: var(--text);
	font-weight: 700;
}

.c-nav-item.active .material-symbols-rounded {
	color: var(--a);
}

.c-club-switcher {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px;
	border: 1px solid var(--border);
	border-radius: var(--r-chip);
	background: var(--surface);
}

.c-club-switcher__tile {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	flex: none;
	border-radius: var(--r-chip-sm);
	background: var(--avatar-bg);
	color: var(--a);
	font-weight: 800;
	font-size: 12px;
}

.c-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.c-topbar {
	height: var(--topbar-h);
	flex: none;
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 0 var(--content-px);
	border-bottom: 1px solid var(--hairline);
}

.c-topbar__title {
	font-size: 19px;
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.c-topbar__sub {
	font-size: 12px;
	font-weight: 500;
	color: var(--text-muted);
}

.c-topbar__actions {
	margin-left: auto;
	display: flex;
	align-items: center;
	gap: 10px;
}

.c-content {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 22px var(--content-px);
}

/* ── Primitives ───────────────────────────────────────────────────────────── */

.c-label {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--text-dim);
}

.c-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--r-card);
	padding: 18px;
}

.c-card--accent {
	border-color: var(--a-line);
}

.c-card__title {
	font-size: 15px;
	font-weight: 700;
}

.c-kpi__value {
	font-family: var(--font-mono);
	font-weight: 800;
	font-size: 25px;
	letter-spacing: -0.02em;
}

.c-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 9px 16px;
	border: 1px solid var(--border);
	border-radius: var(--r-nav);
	background: transparent;
	color: var(--text);
	font-size: 13px;
	font-weight: 700;
	transition: background var(--t-state), border-color var(--t-state);
}

.c-btn:hover {
	background: var(--surface);
}

.c-btn--accent {
	background: var(--a);
	border-color: var(--a);
	color: var(--on-a);
}

.c-btn--accent:hover {
	background: var(--a);
	filter: brightness(1.06);
}

.c-btn--soft {
	background: var(--a-soft);
	border-color: var(--a-line);
	color: var(--a);
}

.c-btn--pill {
	border-radius: var(--r-pill);
	font-size: 15px;
	padding: 13px 22px;
}

.c-btn--pill.c-btn--accent {
	box-shadow: var(--sh-cta);
}

.c-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: var(--r-pill);
	border: 1px solid var(--border);
	background: transparent;
	color: var(--text-muted);
	font-size: 12px;
	font-weight: 600;
}

.c-chip.selected {
	background: var(--surface-raised);
	border-color: var(--border-strong);
	color: var(--text);
}

.c-chip--accent {
	background: var(--a-soft);
	border-color: var(--a-line);
	color: var(--a);
}

.c-pill-status {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: var(--r-pill);
	font-size: 11px;
	font-weight: 600;
}

.c-pill-status--paid {
	background: var(--a2-soft);
	color: var(--a2);
}

.c-pill-status--pending {
	background: var(--a-soft);
	color: var(--a);
}

.c-pill-status--cancelled {
	border: 1px solid var(--border);
	color: var(--text-muted);
}

/* Σειρές χωρισμένες με hairline — το βασικό μοτίβο λίστας σε όλα τα screens. */
.c-rows > * + * {
	border-top: 1px solid var(--hairline);
}

.c-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 0;
}

.c-avatar {
	display: grid;
	place-items: center;
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: var(--r-pill);
	background: var(--avatar-bg);
	color: var(--text-2);
	font-size: 11px;
	font-weight: 700;
}

.c-avatar--accent {
	background: var(--a-soft);
	border: 1px solid var(--a-line);
	color: var(--a);
}

.c-bar {
	height: 5px;
	border-radius: var(--r-pill);
	background: var(--border);
	overflow: hidden;
}

.c-bar__fill {
	height: 100%;
	border-radius: var(--r-pill);
	background: var(--a);
}

.c-table {
	width: 100%;
	border-collapse: collapse;
}

.c-table thead th {
	background: var(--surface);
	padding: 10px 12px;
	text-align: left;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--text-muted);
}

.c-table tbody td {
	padding: 11px 12px;
	font-size: 12.5px;
	font-weight: 500;
	border-top: 1px solid var(--hairline);
}

.c-table tbody tr.cancelled {
	opacity: 0.5;
}

.c-empty {
	padding: 40px 0;
	color: var(--text-dim);
	font-size: 13px;
}

/* ── Telerik overrides ────────────────────────────────────────────────────────
   Το Kendo theme έρχεται light. Ξαναδένουμε τις βασικές του μεταβλητές στην
   παλέτα του Clubora ώστε τα Telerik components να μη σπάνε το σκούρο θέμα. */

.k-body,
body {
	--kendo-color-app-surface: var(--surface);
	--kendo-color-on-app-surface: var(--text);
	--kendo-color-surface: var(--surface);
	--kendo-color-surface-alt: var(--bg);
	--kendo-color-base: var(--surface);
	--kendo-color-base-subtle: var(--surface-raised);
	--kendo-color-on-base: var(--text);
	--kendo-color-border: var(--border);
	--kendo-color-border-alt: var(--border-strong);
	--kendo-color-primary: var(--a);
	--kendo-color-on-primary: var(--on-a);
	--kendo-color-success: var(--a2);
	--kendo-color-subtle: var(--text-muted);
	--kendo-font-family: var(--font-ui);
}

/* ── Καταστάσεις οθόνης ───────────────────────────────────────────────────── */

.c-skeleton {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 0;
}

.c-skeleton__row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--hairline);
}

.c-skeleton__day {
	width: 42px;
	height: 34px;
	border-radius: 8px;
	background: var(--surface);
}

.c-skeleton__lines {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.c-skeleton__line {
	height: 11px;
	border-radius: 5px;
	background: var(--surface);
}

.c-skeleton__line--short {
	width: 38%;
}

.c-skeleton__day,
.c-skeleton__line {
	animation: c-pulse 1.4s ease-in-out infinite;
}

@keyframes c-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.45; }
}

/* Σφάλμα: inline, σε accent, πάνω από το στοιχείο που αφορά (design handoff). */
.c-error {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 0;
	color: var(--a);
	font-size: 13px;
	font-weight: 600;
}

.c-empty__action {
	margin-top: 14px;
}

/* ── Πλέγματα & KPI ───────────────────────────────────────────────────────── */

.c-kpi-row {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 20px;
}

.c-grid {
	display: grid;
	gap: 14px;
	align-items: start;
}

.c-grid--16-10 { grid-template-columns: 1.6fr 1fr; }
.c-grid--15-10 { grid-template-columns: 1.5fr 1fr; }
.c-grid--155-10 { grid-template-columns: 1.55fr 1fr; }
.c-grid--14-10 { grid-template-columns: 1.4fr 1fr; }
.c-grid--135-10 { grid-template-columns: 1.35fr 1fr; }
.c-grid--stack { grid-template-columns: 1fr; }

.c-card__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
}

.c-kpi__delta {
	margin-top: 6px;
	font-size: 11px;
	font-weight: 600;
}

.c-kpi__delta.is-up { color: var(--a2); }
.c-kpi__delta.is-down { color: var(--text-muted); }

.c-kpi__note {
	margin-top: 6px;
	font-size: 11px;
	color: var(--text-muted);
}

.c-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 22px;
}

.c-facts > div > div:last-child {
	margin-top: 4px;
	font-size: 13px;
	font-weight: 600;
}

.c-link-accent {
	display: inline-block;
	margin-top: 14px;
	color: var(--a);
	font-size: 12px;
	font-weight: 700;
	text-decoration: none;
}

.c-row__main { flex: 1; min-width: 0; }
.c-row__title { font-size: 14px; font-weight: 700; }
.c-row__meta { margin-top: 3px; font-size: 12px; color: var(--text-muted); }
.c-row__right { flex: none; text-align: right; }

/* ── Γράφημα ωρών (A1) ────────────────────────────────────────────────────── */

.c-hourchart {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	height: 190px;
	padding-top: 8px;
}

.c-hourchart__col {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: center;
	height: 100%;
	gap: 8px;
}

.c-hourchart__bar {
	width: 100%;
	border-radius: 5px 5px 0 0;
	background: var(--border);
	transition: height var(--t-state);
}

.c-hourchart__bar.is-mid { background: var(--border-strong); }
.c-hourchart__bar.is-high { background: var(--a-line); }
.c-hourchart__bar.is-full { background: var(--a); }

.c-hourchart__axis {
	font-family: var(--font-mono);
	font-size: 10px;
	color: var(--text-faint);
}

/* ── Ημερολόγιο (A2) ──────────────────────────────────────────────────────────
   Γεωμετρία από το handoff: 66px χρονικός οδηγός, μία ώρα = 44px. Τα κελιά του
   οδηγού πρέπει να είναι ακριβώς 44px (border-box) αλλιώς οι ώρες ξεσυγχρονίζονται
   από τα μπλοκ. */

.c-daynav {
	display: flex;
	align-items: center;
	gap: 10px;
}

.c-daynav__label {
	min-width: 150px;
	text-align: center;
	font-size: 14px;
	font-weight: 700;
}

.c-iconbtn {
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border: 1px solid var(--border);
	border-radius: 9px;
	background: transparent;
	color: var(--text-2);
	cursor: pointer;
}

.c-iconbtn:hover { border-color: var(--border-strong); }

.c-legend {
	display: flex;
	gap: 14px;
	margin-left: 8px;
}

.c-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	color: var(--text-muted);
}

.c-legend__dot {
	width: 10px;
	height: 10px;
	border-radius: 3px;
}

.c-legend__dot.is-paid { background: var(--a); }
.c-legend__dot.is-pending { border: 1px dashed var(--a-line); }
.c-legend__dot.is-maintenance { background: var(--text-faint-app); }
.c-legend__dot.is-open { background: var(--a2); }

.c-cal { min-width: 900px; }

.c-cal__head,
.c-cal__body {
	display: grid;
	grid-template-columns: 66px repeat(var(--cal-courts, 5), 1fr);
	gap: 8px;
}

.c-cal__head { margin-bottom: 10px; }

.c-cal__court { text-align: center; }
.c-cal__court-name { font-size: 13px; font-weight: 700; }
.c-cal__court-meta { margin-top: 2px; font-size: 11px; color: var(--text-dim); }

.c-cal__gutter {
	display: flex;
	flex-direction: column;
}

.c-cal__hour {
	box-sizing: border-box;
	height: var(--calendar-hour-h);
	padding-top: 2px;
	font-size: 11px;
	color: var(--text-faint);
	text-align: right;
	padding-right: 8px;
}

.c-cal__col {
	position: relative;
	border-left: 1px solid var(--hairline-app);
	background: repeating-linear-gradient(180deg, transparent 0 43px, var(--hairline-app) 43px 44px);
}

.c-block {
	position: absolute;
	left: 2px;
	right: 2px;
	overflow: hidden;
	padding: 7px 9px;
	border-radius: var(--r-block);
	cursor: pointer;
}

.c-block__title { font-size: 11px; font-weight: 700; }
.c-block__meta { margin-top: 2px; font-size: 10px; opacity: 0.85; }

.c-block.is-paid {
	background: var(--a-soft);
	border: 1px solid var(--a-line);
	border-left: 3px solid var(--a);
}

.c-block.is-pending {
	border: 1px dashed var(--a-line);
	color: var(--text-2);
}

.c-block.is-open {
	background: var(--a2-soft);
	border: 1px solid var(--a2);
	color: var(--text);
}

.c-block.is-maintenance {
	background: var(--fill-maintenance);
	border: 1px solid var(--border-strong);
	color: var(--text-muted);
}

.c-block.is-selected {
	background: var(--a);
	border-color: var(--a);
	color: var(--on-a);
	box-shadow: var(--sh-cta);
}

.c-cal__detail { margin-top: 18px; }
