/* AFC Blue Lions – Prezență și plăți */
.blp {
	--navy: #0b2a5b;
	--blue: #1d64d8;
	--bg: #f2f5fa;
	--card: #ffffff;
	--line: #dde3ec;
	--text: #14213d;
	--muted: #64708a;
	--ok: #15803d;      --ok-bg: #dcfce7;
	--wait: #a16207;    --wait-bg: #fef3c7;
	--bad: #b91c1c;     --bad-bg: #fee2e2;
	--part: #c2410c;    --part-bg: #ffedd5;
	--free: #1d4ed8;    --free-bg: #dbeafe;
	--purple: #6d28d9;  --purple-bg: #ede9fe;
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	-webkit-text-size-adjust: 100%;
}
.blp *, .blp *::before, .blp *::after { box-sizing: border-box; }
.blp a { color: var(--blue); }
.blp h1 { font-size: 1.6rem; margin: 0 0 .75rem; line-height: 1.2; }
.blp h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.blp code { background: #eef2f8; padding: .1em .35em; border-radius: 4px; font-size: .85em; word-break: break-all; }

/* Header */
.blp-top {
	position: sticky; top: 0; z-index: 20;
	display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
	padding: .6rem 1rem; background: var(--navy); color: #fff;
}
.blp-brand { color: #fff !important; text-decoration: none; font-weight: 800; letter-spacing: .02em; font-size: 1.05rem; }
.blp-brand span { font-weight: 400; opacity: .75; margin-left: .25rem; }
.blp-brand-big { color: var(--navy) !important; font-size: 1.5rem; margin-bottom: .25rem; display: block; }
.blp-tabs { display: flex; flex-wrap: wrap; gap: .25rem; flex: 1; }
.blp-tabs a { color: #cfdcf5; text-decoration: none; padding: .45rem .8rem; border-radius: 8px; font-weight: 600; }
.blp-tabs a.is-active, .blp-tabs a:hover { background: rgba(255,255,255,.14); color: #fff; }
.blp-user { font-size: .9rem; opacity: .9; }
.blp-user a { color: #fff; }

.blp-main { max-width: 1100px; margin: 0 auto; padding: 1rem 1rem 6rem; }
.blp-muted { color: var(--muted); font-size: .92rem; }
.blp-box { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 1rem; }
.blp-center { max-width: 480px; margin: 3rem auto; text-align: center; }

.blp-flash { padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1rem; font-weight: 600; }
.blp-flash.is-ok { background: var(--ok-bg); color: var(--ok); }
.blp-flash.is-err { background: var(--bad-bg); color: var(--bad); }
.blp-flash.is-wait { background: var(--wait-bg); color: var(--wait); }

/* Butoane și câmpuri */
.blp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
	min-height: 44px; padding: .55rem 1.1rem; border: 0; border-radius: 10px;
	background: var(--blue); color: #fff !important; font: inherit; font-weight: 700;
	text-decoration: none; cursor: pointer; white-space: nowrap;
}
.blp-btn:hover { filter: brightness(1.07); }
.blp-btn:disabled { opacity: .6; cursor: wait; }
.blp-btn-light { background: #e7edf7; color: var(--navy) !important; }
.blp-btn-danger { background: var(--bad-bg); color: var(--bad) !important; }
.blp-btn-small { min-height: 36px; padding: .35rem .7rem; font-size: .9rem; }
.blp-btn-big { min-height: 54px; padding: .7rem 1.6rem; font-size: 1.1rem; }

.blp input[type=text], .blp input[type=number], .blp input[type=search], .blp input[type=date],
.blp input[type=month], .blp input[type=password], .blp input[type=file], .blp select {
	font: inherit; min-height: 44px; padding: .45rem .7rem; border: 1px solid #c7d0de; border-radius: 10px;
	background: #fff; color: var(--text); max-width: 100%;
}
.blp input:focus, .blp select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }

.blp-form { display: grid; gap: .8rem; max-width: 560px; }
.blp-form label { display: grid; gap: .3rem; font-weight: 600; font-size: .95rem; }
.blp-form label[hidden] { display: none; }
.blp-form .blp-inline, .blp-inline { display: flex !important; align-items: center; gap: .5rem; font-weight: 500; }
.blp-inline input[type=checkbox] { width: 22px; height: 22px; }
.blp-form-row { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); max-width: none; align-items: end; }
.blp-form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: .7rem; }
.blp-form legend { font-size: .9rem; color: var(--muted); padding: 0 .3rem; }
.blp-months { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.blp-w-s { width: 80px; }
.blp-nowrap { white-space: nowrap; }
.blp-inline-form { display: inline; }

.blp-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.blp-actions-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.blp-actions-row .blp-box { flex: 1 1 320px; }
.blp-collapsible > summary { list-style: none; }
.blp-collapsible > summary::-webkit-details-marker { display: none; }
.blp-collapsible[open] > summary { margin-bottom: 1rem; }

/* Login */
.blp-login { min-height: 100vh; display: grid; place-items: center; padding: 1rem; }
.blp-login .blp-box { width: 100%; max-width: 420px; padding: 1.75rem; }
.blp-login form p { margin: 0 0 1rem; }
.blp-login label { display: block; font-weight: 600; margin-bottom: .3rem; }
.blp-login input[type=text], .blp-login input[type=password] { width: 100%; min-height: 50px; }
.blp-login .login-remember label { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.blp-login .login-remember input { width: 22px; height: 22px; }
.blp-login input[type=submit] {
	width: 100%; min-height: 52px; border: 0; border-radius: 10px; background: var(--blue);
	color: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer;
}

/* Alegerea grupei */
.blp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.blp-card {
	display: grid; gap: .25rem; padding: 1.1rem; background: var(--card); border: 1px solid var(--line);
	border-radius: 14px; text-decoration: none; color: var(--text) !important; min-height: 110px;
	box-shadow: 0 1px 2px rgba(11,42,91,.05);
}
.blp-card:hover, .blp-card:active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(29,100,216,.15); }
.blp-card-title { font-size: 1.3rem; font-weight: 800; color: var(--navy); }
.blp-card-sub { color: var(--muted); font-size: .92rem; }
.blp-card-count { font-weight: 600; font-size: .9rem; color: var(--blue); }

/* Prezență */
.blp-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: .75rem; }
.blp-head h1 { margin: 0; }
.blp-back { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9rem; border-radius: 10px; background: #e7edf7; color: var(--navy) !important; font-weight: 700; text-decoration: none; white-space: nowrap; }
.blp-daybar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.blp-dayform { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.blp-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .75rem; }
.blp-quick { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.blp-quick .blp-search { flex: 1 1 200px; }

.blp-kidlist { display: grid; gap: .45rem; }
.blp-kidrow {
	position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: .75rem;
	min-height: 64px; padding: .55rem .9rem; background: var(--card); border: 2px solid var(--line);
	border-left-width: 8px; border-radius: 14px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.blp-kidrow input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.blp-kidrow input[type=hidden] { display: none; }
.blp-check {
	width: 40px; height: 40px; border-radius: 50%; border: 3px solid #b9c3d3; background: #fff;
	display: grid; place-items: center; transition: all .12s;
}
.blp-kidrow.is-present .blp-check { background: var(--ok); border-color: var(--ok); }
.blp-kidrow.is-present .blp-check::after { content: ""; width: 10px; height: 18px; border: solid #fff; border-width: 0 4px 4px 0; transform: translateY(-2px) rotate(45deg); }
.blp-kidrow.is-present { box-shadow: inset 0 0 0 1px var(--ok); }
.blp-name { font-weight: 700; font-size: 1.05rem; }
.blp-badges { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }
.blp-kidrow input:focus-visible ~ .blp-check { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Culoarea rândului după plată */
.blp-kidrow.st-platit { border-left-color: var(--ok); }
.blp-kidrow.st-termen { border-left-color: #eab308; }
.blp-kidrow.st-neplatit { border-left-color: var(--bad); background: #fff5f5; }
.blp-kidrow.st-partial { border-left-color: #f97316; background: #fff8f1; }
.blp-kidrow.st-bursier { border-left-color: #3b82f6; }

.blp-savebar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: .7rem max(1rem, calc((100vw - 1100px) / 2 + 1rem)); background: #fff; border-top: 1px solid var(--line);
	box-shadow: 0 -4px 16px rgba(11,42,91,.08);
}

/* Badge-uri de status */
.blp-badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 700; background: #eef2f8; color: var(--muted); white-space: nowrap; }
.blp-badge.st-platit { background: var(--ok-bg); color: var(--ok); }
.blp-badge.st-termen { background: var(--wait-bg); color: var(--wait); }
.blp-badge.st-neplatit { background: var(--bad-bg); color: var(--bad); }
.blp-badge.st-partial { background: var(--part-bg); color: var(--part); }
.blp-badge.st-bursier { background: var(--free-bg); color: var(--free); }
.blp-badge.st-restanta { background: var(--bad); color: #fff; }
.blp-badge.st-relegit { background: var(--purple); color: #fff; }

.blp-legend { margin-top: 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1rem; }
.blp-legend summary { font-weight: 700; cursor: pointer; }
.blp-legend ul { list-style: none; padding: 0; margin: .75rem 0 0; display: grid; gap: .5rem; }

/* Tabele */
.blp-tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 1rem; }
.blp-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.blp-table th, .blp-table td { padding: .55rem .65rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.blp-table th { background: #f6f8fc; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.blp-table tr:last-child td { border-bottom: 0; }
.blp-box .blp-table th { background: transparent; }
.blp-table input[type=text] { width: 100%; min-width: 140px; }
.blp-c { text-align: center !important; }
.blp-r { text-align: right !important; white-space: nowrap; }
.blp-yes { color: var(--ok); font-weight: 800; }
.blp-no { color: var(--bad); }
.blp-grid-table td, .blp-grid-table th { padding: .45rem .5rem; }
.blp-sticky { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 180px; }
.blp-grid-table th.blp-sticky { background: #f6f8fc; }
.st-row-neplatit td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.st-row-partial td:first-child { box-shadow: inset 4px 0 0 #f97316; }
.st-row-termen td:first-child { box-shadow: inset 4px 0 0 #eab308; }

.blp-payform { display: flex; gap: .35rem; align-items: center; }
.blp-payform input[type=number] { width: 90px; min-height: 36px; }
.blp-payform select { min-height: 36px; padding: .2rem .4rem; }

.blp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.blp-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; display: grid; }
.blp-stats span { color: var(--muted); font-size: .85rem; }
.blp-stats strong { font-size: 1.3rem; color: var(--navy); }

.blp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1rem; }
.blp-delete-kid { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--line); }

@media (max-width: 640px) {
	.blp-main { padding: .75rem .6rem 6rem; }
	.blp-kidrow { grid-template-columns: 40px 1fr; }
	.blp-badges { grid-column: 2; justify-content: flex-start; }
	.blp-user { width: 100%; }
}

.blp-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .45rem 1rem; }
.blp-big-check { width: 24px; height: 24px; }
.blp-creds { border: 2px solid var(--wait); background: #fffbeb; }
.blp-creds code { font-size: 1.05rem; background: #fff; }

@media print {
	.blp-top, .blp-flash, .blp-main > *:not(.blp-creds), .blp-creds button { display: none !important; }
	.blp { background: #fff; }
	.blp-creds { border: 0; background: #fff; }
}

/* Cadranele din Plăți: se pot apăsa ca filtru */
.blp-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.blp-stats a.blp-stat { background: var(--card); border: 1px solid var(--line); border-left-width: 6px; border-radius: 12px; padding: .7rem .9rem; display: grid; text-decoration: none; color: inherit; }
.blp-stats a.blp-stat:hover { box-shadow: 0 0 0 2px rgba(29,100,216,.15); }
.blp-stats a.blp-stat.is-active { box-shadow: 0 0 0 3px var(--blue); }
.st-card-platit { border-left-color: var(--ok) !important; }
.st-card-platit strong { color: var(--ok) !important; }
.st-card-neplatit { border-left-color: var(--bad) !important; }
.st-card-neplatit strong { color: var(--bad) !important; }
.st-card-partial { border-left-color: #f97316 !important; }
.st-card-partial strong { color: var(--part) !important; }
.st-card-bursier { border-left-color: #3b82f6 !important; }
.st-card-bursier strong { color: var(--free) !important; }

/* Situația pe antrenori */
.blp-coach-summary > summary { cursor: pointer; padding: .2rem 0; }
.blp-coach-summary[open] > summary { margin-bottom: .75rem; }
.blp-coach-summary .blp-tablewrap { margin-bottom: .5rem; }
.blp-coach-summary tr.is-selected td { background: #eef4ff; }
.blp-num { display: inline-block; min-width: 2.2em; padding: .1rem .45rem; border-radius: 999px; font-weight: 800; }
.blp-num.st-platit { background: var(--ok-bg); color: var(--ok); }
.blp-num.st-partial { background: var(--part-bg); color: var(--part); }
.blp-num.st-neplatit { background: var(--bad-bg); color: var(--bad); }
.blp-num.st-bursier { background: var(--free-bg); color: var(--free); }
.blp-coachcol { font-size: .88rem; color: var(--muted); min-width: 120px; }
.blp-main { max-width: 1320px; }
.blp-payform input[type=number] { width: 74px; }
.blp-payform select { max-width: 112px; }

/* În aplicația de prezență */
.blp-program-admin { margin-bottom: 1rem; gap: .5rem; }
.blp-program-edit > summary { cursor: pointer; }
.blp-program-edit[open] > summary { margin-bottom: 1rem; }
.blp textarea { font: inherit; width: 100%; padding: .55rem .7rem; border: 1px solid #c7d0de; border-radius: 10px; }


/* Istoric pe zile */
.blp-daygroups { display: grid; gap: .5rem; }
.blp-daygroup { padding: 0; margin: 0; overflow: hidden; }
.blp-daygroup > summary { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .5rem 1rem; padding: .8rem 1rem; cursor: pointer; list-style: none; }
.blp-daygroup > summary::-webkit-details-marker { display: none; }
.blp-daygroup.has-unpaid { border-left: 6px solid var(--bad); }
.blp-daygroup[open] > summary { border-bottom: 1px solid var(--line); }
.blp-daygroup > p, .blp-daygroup > ul { margin: .75rem 1rem; }
.blp-dg-title { display: grid; }
.blp-dg-title strong { font-size: 1.15rem; color: var(--navy); }
.blp-dg-present { white-space: nowrap; }
.blp-dg-present strong { font-size: 1.2rem; }
.blp-dg-nums { display: flex; gap: .3rem; }
.blp-dg-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .35rem 1rem; }
.blp-dg-list li { display: flex; justify-content: space-between; gap: .5rem; align-items: center; padding: .3rem 0; border-bottom: 1px dashed var(--line); }
.blp-dg-legend .blp-num { min-width: 0; font-weight: 700; }
.blp-stats > div.blp-stat { border-left-width: 6px; }
@media (max-width: 640px) { .blp-daygroup > summary { grid-template-columns: 1fr; } }

/* Editează grupa */
.blp-head-action { margin-left: auto; }
.blp-edit-table input[type=text] { min-width: 220px; }
.blp-w-y { width: 90px; }
.blp-move { display: inline-flex; gap: .3rem; }
.blp-move select { min-height: 36px; padding: .2rem .4rem; }
.blp-edit-list { display: grid; gap: .5rem; }
.blp-edit-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; }
.blp-edit-main { display: flex; flex: 1 1 360px; gap: .4rem; align-items: center; }
.blp-edit-main input[type=text] { flex: 1; min-width: 160px; min-height: 40px; }
.blp-edit-main input[type=number] { min-height: 40px; }

/* Telefon */
@media (max-width: 640px) {
	.blp-top { padding: .5rem .6rem; gap: .35rem .5rem; }
	.blp-brand { font-size: .95rem; }
	.blp-brand span { display: none; }
	.blp-tabs { order: 3; width: 100%; flex: none; flex-wrap: nowrap; overflow-x: auto; gap: .15rem; -webkit-overflow-scrolling: touch; }
	.blp-tabs a { padding: .4rem .65rem; white-space: nowrap; }
	.blp-user { width: auto; margin-left: auto; font-size: .85rem; }
	.blp h1 { font-size: 1.35rem; }
	.blp-head { flex-wrap: wrap; gap: .5rem; }
	.blp-head > div { flex: 1 1 0; min-width: 0; }
	.blp-head-action { order: 3; width: 100%; margin-left: 0; }
	.blp-daybar strong { flex-basis: 100%; }
	.blp-kidrow { min-height: 58px; padding: .45rem .7rem; gap: .2rem .6rem; }
	.blp-check { width: 36px; height: 36px; }
	.blp-name { font-size: 1rem; }
	.blp-edit-main { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
	.blp-edit-main input[type=text] { flex: 1 1 100%; min-width: 0; }
	.blp-move select { max-width: 150px; }
	.blp-savebar { padding: .6rem .75rem; }
	.blp-savebar .blp-btn-big { min-height: 50px; padding: .6rem 1rem; font-size: 1rem; }
}

.blp-moneyline { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); margin-top: .1rem; }
.blp-dg-list li > span:first-child { display: grid; }

/* Plata online */
.blp-copy { display: flex; gap: .5rem; margin: .6rem 0; }
.blp-copy input { flex: 1; min-width: 0; font: inherit; font-size: .9rem; padding: .5rem .6rem; border: 1px solid #c7d0de; border-radius: 10px; background: #f6f8fc; }
.blp-inactive-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.blp-inactive-row + .blp-form { margin-top: .8rem; }
.blp-doc-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.blp-doc-form input[type=text] { min-width: 130px; flex: 1; }
.blp-payform .blp-w-ref { width: 110px; }
.blp-consent { align-items: flex-start !important; font-weight: 500 !important; font-size: .95rem; line-height: 1.4; }
.blp-consent input[type=checkbox] { flex: 0 0 22px; margin-top: .15rem; }
.blp-consent span { font-weight: 400; }
.blp-ways { margin: .3rem 0 0; padding-left: 1.2rem; }
.blp-ways li { margin: .35rem 0; }
.blp-pay { max-width: 520px; margin: 0 auto; }
.blp-pay-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; color: var(--navy); margin: .4rem 0 1rem; }
.blp-pay-brand img { width: 44px; height: 44px; object-fit: contain; }
.blp-pay h1 { margin-top: 0; }
.blp-pay-total td { font-weight: 800; font-size: 1.1rem; }
.blp-pay .blp-form { max-width: none; margin-top: 1rem; }
.blp-pay .blp-btn-big { width: 100%; }
