/* =========================================================
   My Wise - Panel & „Moje konto" UI
   Spójny system wizualny dla widoków KURSANTA i LEKTORA
   w kolorystyce marki (navy #1E3A5F + mięta #42C690).
   Zasady redesignu: bez kropek przy nagłówkach, bez bocznych
   pasków, prostokątne plakietki (6px), karty 8-10px.
   ========================================================= */

.ls-panel,
.woocommerce-account .woocommerce {
	--ls-ink:      #1E3A5F;  /* navy - nagłówki i tekst główny */
	--ls-brand:    #1E3A5F;  /* przyciski primary */
	--ls-brand-d:  #2a4d80;  /* hover primary */
	--ls-accent:   #42C690;  /* mięta - akcent */
	--ls-mist:     #eef2f6;  /* tło notek info */
	--ls-muted:    #566576;  /* tekst pomocniczy */
	--ls-dim:      #8a99a8;  /* podpisy */
	--ls-line:     #e7edf3;  /* obramowania */
	--ls-paper:    #FFFFFF;
	--ls-bg-alt:   #F8FAFC;
	--ls-ok:       #2f6a52;  /* mięta jako tekst */
	--ls-ok-bg:    #eaf6f0;
	--ls-soon:     #B26A00;
	--ls-soon-bg:  #FFF3DF;
	--ls-danger:   #D23B36;
	--ls-danger-bg:#FDECEC;

	--ls-r:        10px;     /* karty / kontenery */
	--ls-r-card:   8px;      /* elementy w kartach */
	--ls-r-sm:     6px;      /* przyciski / inputy / plakietki */

	--ls-font-head: 'Schibsted Grotesk', system-ui, sans-serif;
	--ls-font-body: 'Hanken Grotesk', system-ui, sans-serif;
	--ls-font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ---------- Kontener panelu ---------- */
.ls-panel {
	color: var(--ls-ink);
	line-height: 1.6;
	max-width: 940px;
	font-family: var(--ls-font-body);
}
.ls-panel *,
.ls-panel *::before,
.ls-panel *::after { box-sizing: border-box; }

/* ---------- Nagłówek panelu (avatar + tytuł) ---------- */
.ls-panel__head {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1.5rem;
}
.ls-avatar {
	flex: 0 0 auto;
	width: 58px; height: 58px;
	border-radius: 50%;
	background: var(--ls-brand);
	color: #fff;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--ls-font-head);
	font-weight: 700; font-size: 1.3rem; letter-spacing: .01em;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(30, 58, 99, .18);
}
.ls-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ls-panel__titles { min-width: 0; }
.ls-panel__title {
	margin: 0; font-size: 1.55rem; font-weight: 800; line-height: 1.15;
	font-family: var(--ls-font-head); letter-spacing: -0.01em;
}
.ls-panel__sub { margin: .2rem 0 0; color: var(--ls-muted); font-size: .95rem; }

/* ---------- Kafelki statystyk (jednolita ramka, bez pasków) ---------- */
.ls-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
	gap: 1rem;
	margin: 0 0 1.75rem;
}
.ls-stat {
	background: var(--ls-paper);
	border: 1px solid var(--ls-line);
	border-radius: var(--ls-r);
	padding: 1rem 1.1rem;
}
.ls-stat__num {
	font-family: var(--ls-font-head);
	font-size: 1.95rem; font-weight: 800; line-height: 1;
	color: var(--ls-ink);
}
.ls-stat--accent .ls-stat__num { color: var(--ls-accent); }
.ls-stat--ok .ls-stat__num     { color: var(--ls-ok); }
.ls-stat__label { margin-top: .4rem; color: var(--ls-muted); font-size: .85rem; }

/* ---------- Karty / sekcje ---------- */
.ls-card {
	background: var(--ls-paper);
	border: 1px solid var(--ls-line);
	border-radius: var(--ls-r);
	padding: 1.5rem;
	margin: 0 0 1.5rem;
	box-shadow: 0 2px 10px rgba(30, 58, 99, .06);
}
.ls-card:last-child { margin-bottom: 0; }
/* Karta wymagająca uwagi lektora, np. zgłoszone nieobecności na nadchodzące zajęcia. */
.ls-card--uwaga { border-left: 4px solid var(--ls-accent); }

/* ---------- Zakładki panelu ----------
   Zwykłe odnośniki, bez JavaScriptu. Podkreślenie zamiast wypełnienia,
   żeby pasek nie konkurował kolorem z kafelkami statystyk pod nim. */
.ls-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem;
	border-bottom: 1px solid var(--ls-line);
	margin: 0 0 1.5rem;
}
.ls-tab {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .7rem 1rem;
	margin-bottom: -1px;
	border-bottom: 2px solid transparent;
	color: var(--ls-muted);
	font-family: var(--ls-font-head);
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none;
	white-space: nowrap;
	transition: color .15s ease, border-color .15s ease;
}
.ls-tab:hover { color: var(--ls-ink); }
.ls-tab.is-active {
	color: var(--ls-ink);
	border-bottom-color: var(--ls-accent);
}
.ls-tab__num {
	display: inline-block;
	min-width: 1.35rem;
	padding: 0 .35rem;
	border-radius: var(--ls-r-sm);
	background: var(--ls-mist);
	color: var(--ls-muted);
	font-size: .78rem;
	font-weight: 600;
	line-height: 1.35rem;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.ls-tab.is-active .ls-tab__num { background: var(--ls-ok-bg); color: var(--ls-ok); }
.ls-tab__dot {
	width: 8px; height: 8px; border-radius: 50%;
	background: var(--ls-soon);
	display: inline-block;
}

/* ---------- Dwie kolumny na Przeglądzie ---------- */
.ls-grid2 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin: 0 0 1.5rem;
}
.ls-grid2 > .ls-card { margin: 0; }

/* ---------- Lista skrótowa (najbliższe zajęcia, lekcje) ---------- */
.ls-lista { list-style: none; margin: 0; padding: 0; }
.ls-lista__el {
	display: flex;
	align-items: baseline;
	gap: .85rem;
	padding: .55rem 0;
	border-bottom: 1px solid var(--ls-line);
}
.ls-lista__el:last-child { border-bottom: 0; padding-bottom: 0; }
.ls-lista__data {
	flex: 0 0 3rem;
	font-family: var(--ls-font-mono);
	font-size: .85rem;
	color: var(--ls-ink);
	font-variant-numeric: tabular-nums;
}
.ls-lista__tresc { flex: 1 1 auto; min-width: 0; }
.ls-lista__tresc a { color: var(--ls-ink); text-decoration: none; }
.ls-lista__tresc a:hover { text-decoration: underline; }

/* ---------- Lista kursów jako karty do wyboru ---------- */
.ls-kursy {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 1rem;
}
.ls-kurs {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	padding: 1rem 1.1rem;
	border: 1px solid var(--ls-line);
	border-radius: var(--ls-r-card);
	background: var(--ls-bg-alt);
	color: var(--ls-ink);
	text-decoration: none;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.ls-kurs:hover {
	border-color: var(--ls-accent);
	box-shadow: 0 6px 18px rgba(30, 58, 99, .08);
	transform: translateY(-2px);
}
.ls-kurs__nazwa {
	font-family: var(--ls-font-head);
	font-weight: 600;
	line-height: 1.3;
}
.ls-kurs__okres { color: var(--ls-dim); font-size: .85rem; }
.ls-kurs__meta {
	display: flex;
	flex-direction: column;
	gap: .1rem;
	margin-top: .35rem;
	color: var(--ls-muted);
	font-size: .85rem;
}
.ls-kurs__uwaga {
	margin-top: .5rem;
	padding: .3rem .55rem;
	border-radius: var(--ls-r-sm);
	background: var(--ls-soon-bg);
	color: var(--ls-soon);
	font-size: .8rem;
	font-weight: 600;
	align-self: flex-start;
}

/* ---------- Powrót do listy ---------- */
.ls-wroc { margin: 0 0 1rem; }
.ls-wroc a {
	color: var(--ls-muted);
	text-decoration: none;
	font-size: .9rem;
}
.ls-wroc a:hover { color: var(--ls-ink); }

/* ---------- Pozycja listy obecności ---------- */
.ls-check {
	display: block;
	padding: .4rem .55rem;
	margin: 0 0 .2rem;
	border-radius: var(--ls-r-sm);
	transition: background .15s ease;
}
.ls-check:hover { background: var(--ls-bg-alt); }

.ls-section-title {
	font-family: var(--ls-font-head);
	font-size: 1.15rem; font-weight: 800; color: var(--ls-ink);
	letter-spacing: -0.01em;
	margin: 0 0 1.1rem;
}
.ls-card > .ls-section-title:first-child { margin-top: 0; }
.ls-subhead {
	font-family: var(--ls-font-head);
	font-size: 1rem; font-weight: 700; margin: 1.5rem 0 .6rem; color: var(--ls-ink);
}
.ls-subhead:first-child { margin-top: 0; }
.ls-subhead .ls-period { font-weight: 400; color: var(--ls-muted); font-size: .9rem; font-family: var(--ls-font-body); }

/* ---------- Tabele ---------- */
.ls-table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: .95rem;
	margin: 0;
}
.ls-table thead th {
	text-align: left;
	font-family: var(--ls-font-mono);
	font-size: .68rem; text-transform: uppercase; letter-spacing: .09em;
	color: var(--ls-dim); font-weight: 500;
	padding: .5rem .75rem;
	border-bottom: 2px solid var(--ls-line);
}
.ls-table tbody td {
	padding: .72rem .75rem;
	border-bottom: 1px solid var(--ls-line);
	vertical-align: middle;
}
.ls-table tbody tr:last-child td { border-bottom: 0; }
.ls-table tbody tr { transition: background .15s ease; }
.ls-table tbody tr:hover { background: var(--ls-bg-alt); }
.ls-table .ls-strong { font-weight: 600; }
.ls-table .ls-dim { color: var(--ls-muted); }
.ls-table .ls-num { font-variant-numeric: tabular-nums; }

/* ---------- Plakietki (prostokątne, bez pigułek) ---------- */
.ls-badge {
	display: inline-flex; align-items: center; gap: .35rem;
	padding: .22rem .6rem; border-radius: var(--ls-r-sm);
	font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.ls-badge--ok   { background: var(--ls-ok-bg);   color: var(--ls-ok); }
.ls-badge--soon { background: var(--ls-soon-bg); color: var(--ls-soon); }
.ls-badge--mist { background: var(--ls-mist);    color: var(--ls-muted); }
.ls-badge--archiwum { background: var(--ls-mist); color: var(--ls-muted); }
.ls-badge--warn { background: #FDECEA; color: #B3362A; }

/* ---------- Stan pusty ---------- */
.ls-empty {
	text-align: center; color: var(--ls-dim);
	padding: 1.85rem 1rem;
	border: 1px dashed var(--ls-line);
	border-radius: var(--ls-r-card);
	background: var(--ls-bg-alt);
}
.ls-empty__icon { font-size: 1.7rem; display: block; margin-bottom: .45rem; opacity: .85; }
.ls-empty a { color: var(--ls-brand); font-weight: 600; }

/* ---------- Przyciski ---------- */
.ls-btn {
	display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
	font-family: var(--ls-font-body);
	font-weight: 700; font-size: .95rem; text-decoration: none; line-height: 1;
	padding: .62rem 1.2rem; border-radius: var(--ls-r-sm);
	border: 1.5px solid transparent;
	transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}
.ls-btn--primary { background: var(--ls-brand); color: #fff; }
.ls-btn--primary:hover { background: var(--ls-brand-d); color: #fff; }
.ls-btn--ghost { background: #fff; color: var(--ls-ink); border-color: #d4dde6; font-weight: 600; }
.ls-btn--ghost:hover { border-color: var(--ls-ink); }
.ls-btn--sm { padding: .42rem .85rem; font-size: .85rem; }
.ls-btn:focus-visible { outline: 2px solid var(--ls-accent); outline-offset: 2px; }
.ls-btn-link {
	background: none; border: none; color: var(--ls-danger);
	cursor: pointer; font: inherit; font-weight: 600; padding: .3rem .5rem; border-radius: var(--ls-r-sm);
	transition: background .15s ease;
}
.ls-btn-link:hover { background: var(--ls-danger-bg); }

/* ---------- Formularze ---------- */
.ls-form-row { display: flex; flex-wrap: wrap; gap: .85rem; align-items: end; }
.ls-field { display: flex; flex-direction: column; gap: .3rem; }
.ls-field > label {
	font-family: var(--ls-font-mono);
	font-size: .68rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
	color: var(--ls-dim);
}
.ls-field--grow { flex: 1 1 240px; }
.ls-input, .ls-select, .ls-textarea {
	font-family: var(--ls-font-body);
	font-size: .95rem;
	padding: .58rem .7rem;
	border: 1px solid #d9e0e8; border-radius: var(--ls-r-sm);
	background: #fff; color: var(--ls-ink);
	min-width: 0;
}
.ls-input:focus, .ls-select:focus, .ls-textarea:focus {
	outline: none; border-color: var(--ls-brand);
	box-shadow: 0 0 0 3px rgba(30, 58, 95, .12);
}
.ls-textarea { width: 100%; resize: vertical; min-height: 92px; }
.ls-form-block { margin: 0 0 1rem; }
.ls-form-block:last-child { margin-bottom: 0; }

/* ---------- Komunikaty (bez bocznych pasków) ---------- */
.ls-alert { padding: .72rem 1rem; border-radius: var(--ls-r-card); font-size: .95rem; margin: 0 0 1.25rem; }
.ls-alert--ok { background: var(--ls-ok-bg); color: var(--ls-ok); }
.ls-note {
	background: var(--ls-mist); color: var(--ls-muted);
	padding: .72rem 1rem; border-radius: var(--ls-r-sm); font-size: .9rem; margin: 0 0 1rem;
}

/* ---------- Wiadomości ---------- */
.ls-msg {
	background: var(--ls-bg-alt); border: 1px solid var(--ls-line);
	border-radius: var(--ls-r-card); padding: .85rem 1rem; margin: 0 0 .75rem;
}
.ls-msg:last-child { margin-bottom: 0; }
.ls-msg__meta {
	font-size: .82rem; color: var(--ls-dim); margin-bottom: .4rem;
	display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
}
.ls-msg__from { font-weight: 700; color: var(--ls-ink); }
.ls-msg__body { color: var(--ls-ink); }
.ls-msg__body p:last-child { margin-bottom: 0; }

/* ---------- Responsywność tabel (mobile → karty) ---------- */
@media (max-width: 600px) {
	.ls-table thead { display: none; }
	.ls-table, .ls-table tbody, .ls-table tr, .ls-table td { display: block; width: 100%; }
	.ls-table tr {
		border: 1px solid var(--ls-line); border-radius: var(--ls-r-card);
		margin-bottom: .75rem; padding: .35rem .25rem; background: #fff;
	}
	.ls-table tbody tr:hover { background: #fff; }
	.ls-table tbody td { border: 0; padding: .4rem .85rem; display: flex; justify-content: space-between; gap: 1rem; }
	.ls-table tbody td::before {
		content: attr(data-label);
		font-family: var(--ls-font-mono);
		font-size: .66rem; text-transform: uppercase; letter-spacing: .08em;
		color: var(--ls-dim); font-weight: 500; flex: 0 0 42%;
	}
	.ls-table tbody td:empty { display: none; }
}

/* =========================================================
   WooCommerce → „Moje konto": nawigacja + treść
   ========================================================= */
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation li { margin: 0 0 .35rem; }
.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: block;
	padding: .68rem .95rem;
	border-radius: var(--ls-r-sm);
	text-decoration: none;
	color: var(--ls-ink); font-weight: 600;
	border: 1px solid transparent;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { background: var(--ls-mist); }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background: var(--ls-brand); color: #fff;
}

/* ---------- Zgodność wsteczna: stare klasy .lp-* (panel lektora) ---------- */
.ls-panel .lp-table, .woocommerce-account .lp-table {
	width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; margin: 0 0 1rem;
}
.ls-panel .lp-table th, .woocommerce-account .lp-table th {
	text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
	color: var(--ls-dim); font-weight: 700; padding: .5rem .75rem; border: 0; border-bottom: 2px solid var(--ls-line); background: none;
}
.ls-panel .lp-table td, .woocommerce-account .lp-table td {
	padding: .72rem .75rem; border: 0; border-bottom: 1px solid var(--ls-line);
}
.ls-panel .lp-pusto, .woocommerce-account .lp-pusto { color: var(--ls-muted); }
.ls-panel .lp-btn, .woocommerce-account .lp-btn {
	display: inline-flex; align-items: center; gap: .45rem;
	background: var(--ls-brand); color: #fff; border: none;
	padding: .6rem 1.15rem; border-radius: var(--ls-r-sm); cursor: pointer; font-weight: 700; text-decoration: none;
}
.ls-panel .lp-btn:hover, .woocommerce-account .lp-btn:hover { background: var(--ls-brand-d); color: #fff; }
.ls-panel .lp-usun, .woocommerce-account .lp-usun {
	background: none; border: none; color: var(--ls-danger); cursor: pointer; padding: .3rem .5rem; border-radius: var(--ls-r-sm);
}
.ls-panel .lp-usun:hover, .woocommerce-account .lp-usun:hover { background: var(--ls-danger-bg); }

/* ---------- Dostępność: ograniczony ruch ---------- */
@media (prefers-reduced-motion: reduce) {
	.ls-btn, .ls-table tbody tr, .ls-btn-link,
	.woocommerce-account .woocommerce-MyAccount-navigation li a { transition: none; }
}
