:root{--ink:#244c59;--muted:#82969d;--line:#e3ecee;--bg:#f5f8f9;--blue:#3da8dc;--green:#15b56b;--teal:#25aaa9}
*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;color:var(--ink);background:var(--bg)}
button,input,select,textarea{font:inherit}.app{min-height:100vh;display:grid;grid-template-columns:245px 1fr}
.sidebar{position:sticky;top:0;height:100vh;padding:28px 22px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;justify-content:space-between}
.logo-dot{width:42px;height:42px;border-radius:14px;background:linear-gradient(135deg,var(--blue),var(--teal),var(--green));box-shadow:0 10px 25px rgba(34,171,169,.18)}
.brand-title{font-weight:800;margin-top:15px}.brand-sub{font-size:12px;color:var(--muted);margin-top:3px}
nav{display:grid;gap:6px;margin-top:35px}nav a{padding:11px 12px;border-radius:10px;text-decoration:none;color:#647d85;font-weight:650}nav a.active,nav a:hover{background:#eef8f7;color:#237575}
.side-footer{display:grid;gap:4px}.side-footer span{font-size:12px;color:var(--muted)}.side-footer form{margin-top:8px}
.content{padding:30px 34px;min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px}.topbar h1{margin:0;font-size:28px}.topbar p{margin:6px 0 0;color:var(--muted)}
.primary{border:0;border-radius:11px;padding:11px 16px;color:#fff;font-weight:800;background:linear-gradient(110deg,#358fc0,#25aaa9,#11ae66);cursor:pointer}
.ghost,.mini{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px 11px;color:#4d6871;text-decoration:none;cursor:pointer}.ghost:hover,.mini:hover{background:#f3f8f8}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin:24px 0}.stat{background:#fff;border:1px solid var(--line);border-radius:17px;padding:18px}.stat span{color:var(--muted);font-size:12px}.stat b{display:block;margin-top:9px;font-size:28px}
.panel{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden}.panel-head{padding:20px 22px;border-bottom:1px solid var(--line)}.panel-head h2{margin:0}.panel-head p{margin:5px 0 0;color:var(--muted);font-size:12px}
.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:900px}th{text-align:left;color:#789097;font-size:11px;padding:12px 16px;background:#f8fbfb}td{padding:14px 16px;border-top:1px solid #edf2f3;font-size:13px;vertical-align:middle}td b{display:block}td small{display:block;color:var(--muted);margin-top:4px}.actions{white-space:nowrap}
.stage{display:inline-block;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:750;background:#eef4f5}.s-form{background:#fff5dd;color:#9c751a}.s-training{background:#e6f8f0;color:#23825b}.s-hired{background:#e5f6e9;color:#27814a}.s-rejected{background:#ffeded;color:#aa4949}.empty{text-align:center;color:var(--muted);padding:45px}
.modal{position:fixed;inset:0;display:none;place-items:center;padding:20px;background:rgba(19,42,49,.42);z-index:50}.modal.show{display:grid}.modal-card{width:min(720px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:22px;box-shadow:0 30px 90px rgba(19,42,49,.25)}.modal-card.small{max-width:520px}.modal-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.modal-head h2{margin:0}.modal-head button{border:0;background:none;font-size:28px;color:#82969d;cursor:pointer}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-grid .full{grid-column:1/-1}label{display:grid;gap:6px;font-size:12px;font-weight:700}input,select,textarea{width:100%;border:1px solid #dce7e9;background:#fbfdfd;border-radius:10px;padding:11px;outline:none}textarea{min-height:82px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:#72c9d8;box-shadow:0 0 0 4px rgba(61,168,220,.07)}
.modal-actions{display:flex;justify-content:flex-end;gap:9px}.decision-grid{display:grid;grid-template-columns:1fr;gap:8px;margin-top:14px}.decision{padding:12px;border-radius:10px;border:0;font-weight:800;cursor:pointer}.decision.training{background:#e9f8f0;color:#247c59}.decision.later{background:#edf5f7;color:#476d79}.decision.reject{background:#ffeded;color:#a74848}
.notice{padding:11px 14px;border-radius:11px;margin:16px 0;font-size:13px}.notice.good{background:#e9f8f0;color:#287956}.notice.bad,.alert{background:#ffeded;color:#a34a4a}.alert{padding:10px;border-radius:10px;margin-top:12px}
.auth-body,.public-body{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(145deg,#f5fafb,#f2f9f4)}
.auth-shell,.public-card{width:min(720px,100%);background:#fff;border:1px solid var(--line);border-radius:22px;padding:30px;box-shadow:0 26px 75px rgba(35,76,90,.1)}.auth-shell{max-width:420px}.auth-accent{width:48px;height:48px;border-radius:15px;background:linear-gradient(135deg,var(--blue),var(--teal),var(--green));margin-bottom:20px}.auth-shell h1,.public-card h1{margin:0 0 7px}.auth-shell p,.public-card p{color:var(--muted)}.auth-shell form{display:grid;gap:13px;margin-top:22px}
.public-card.narrow{max-width:650px}.public-top{display:flex;align-items:flex-start;gap:14px;margin-bottom:24px}.copybox{display:grid;grid-template-columns:1fr auto;gap:8px;margin:18px 0}.back{display:inline-block;margin-top:18px;color:#337a91;text-decoration:none}.done{text-align:center;padding:25px}.check{width:58px;height:58px;margin:0 auto 15px;border-radius:50%;display:grid;place-items:center;background:#e8f8ef;color:#1a9c60;font-size:28px;font-weight:900}
@media(max-width:900px){.app{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.content{padding:20px}.stats{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.topbar{align-items:flex-start;flex-direction:column}.stats{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.copybox{grid-template-columns:1fr}.public-card{padding:20px}}

.side-calendar{margin-top:22px;border-top:1px solid var(--line);padding-top:18px;max-height:280px;overflow:auto}
.side-section-title{font-size:12px;font-weight:800;margin-bottom:10px}
.calendar-row{padding:10px 0;border-bottom:1px solid #edf2f3}
.calendar-row>div:first-child{display:flex;align-items:center;justify-content:space-between;gap:8px}
.calendar-row span{font-size:10px;color:var(--muted)}
.calendar-tags{display:flex;gap:5px;margin-top:6px;flex-wrap:wrap}
.calendar-tags i{font-style:normal;font-size:9px;padding:4px 6px;border-radius:7px;background:#f1f7f7;color:#55737d}
.side-empty{font-size:11px;color:var(--muted)}
.access-note{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:18px;padding:11px 14px;background:#eef8f7;border:1px solid #dcefed;border-radius:12px;font-size:12px}
.access-note span{color:#688088}
.training-panel{margin-top:18px}
.training-head{display:flex;align-items:center;justify-content:space-between;gap:15px}
.training-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:16px}
.training-card{border:1px solid var(--line);border-radius:14px;padding:15px;background:#fbfdfd}
.training-date{font-size:12px;color:var(--muted);margin-bottom:7px}.training-card b{display:block}.training-card p{margin:10px 0 0;color:var(--muted);font-size:12px}
.training-format{display:inline-block;margin-top:9px;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:800}
.training-format.office{background:#e7f7ef;color:#247c59}.training-format.online{background:#e9f3fb;color:#2f76a0}
.empty-training{grid-column:1/-1;text-align:center;color:var(--muted);padding:24px}
.copy-status{min-height:20px;color:#287956;font-size:12px;margin-top:7px}
@media(max-width:1000px){.training-cards{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.training-cards{grid-template-columns:1fr}}

.muted-small{font-size:11px;color:var(--muted)}
.mini.strong{font-weight:800}
.training-groups-list{padding:16px;display:grid;gap:14px}
.training-group{border:1px solid var(--line);border-radius:16px;background:#fbfdfd;overflow:hidden}
.training-group-top{padding:16px;display:flex;justify-content:space-between;gap:15px;align-items:flex-start}
.training-group-top h3{margin:3px 0 0;font-size:16px}
.participants-count{padding:7px 10px;background:#eef7f6;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap}
.group-comment{margin:0;padding:0 16px 14px;color:var(--muted);font-size:12px}
.participants{border-top:1px solid var(--line)}
.participant{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 16px;border-bottom:1px solid #edf2f3}
.participant:last-child{border-bottom:0}
.participant b{display:block}.participant>div>span{display:block;color:var(--muted);font-size:11px;margin-top:3px}
.participant-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.questionnaire-ok,.questionnaire-wait{font-size:10px;font-weight:800;padding:5px 8px;border-radius:999px}
.questionnaire-ok{background:#e7f7ef;color:#247c59}.questionnaire-wait{background:#fff2dc;color:#9a671b}
.empty-participants{padding:18px 16px;color:var(--muted);font-size:12px}
.questionnaire-view{max-width:880px}
.view-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}
.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800}
.answer-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px}
.answer{padding:14px;border:1px solid var(--line);border-radius:13px;background:#fbfdfd}
.answer.wide{grid-column:1/-1}
.answer span{display:block;font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);margin-bottom:6px}
.answer p{white-space:pre-wrap;margin:0;line-height:1.5}
@media(max-width:720px){
  .participant{align-items:flex-start;flex-direction:column}
  .participant-actions{justify-content:flex-start}
  .answer-grid{grid-template-columns:1fr}
  .answer.wide{grid-column:auto}
  .view-head{flex-direction:column}
}

.brand-block{display:flex;align-items:center;gap:10px}
.calendar-box{margin-top:20px;padding-top:18px;border-top:1px solid var(--line)}
.calendar-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
.calendar-head b{font-size:12px}
.calendar-nav{width:28px;height:28px;border:1px solid var(--line);border-radius:8px;background:#fff;cursor:pointer}
.weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.weekdays span{text-align:center;font-size:9px;color:var(--muted);padding-bottom:4px}
.cal-day{position:relative;aspect-ratio:1;border:0;border-radius:8px;background:transparent;font-size:10px;cursor:default}
.cal-day.has-events{background:#eaf7f5;color:#176a61;font-weight:800;cursor:pointer}
.cal-day.has-events:hover{background:#d9f0ed}
.cal-day i{position:absolute;right:3px;top:2px;font-style:normal;font-size:7px;background:#176a61;color:#fff;min-width:12px;height:12px;border-radius:999px;display:flex;align-items:center;justify-content:center}
.empty-day{visibility:hidden}
.calendar-details{margin-top:10px;padding:10px;border-radius:10px;background:#f6f9f9;display:grid;grid-template-columns:1fr 1fr;gap:3px 8px;font-size:10px;color:var(--muted)}
.calendar-details b{grid-column:1/-1;color:#20363c;margin-bottom:3px}
.full-btn{width:100%}
.workflow{display:flex;align-items:center;gap:8px;margin:16px 0;padding:12px 14px;background:#fff;border:1px solid var(--line);border-radius:14px;overflow:auto}
.workflow-step{display:flex;align-items:center;gap:7px;white-space:nowrap}
.workflow-step b{display:flex;width:22px;height:22px;border-radius:50%;align-items:center;justify-content:center;background:#eaf7f5;color:#176a61;font-size:10px}
.workflow-step span{font-size:11px;font-weight:700}
.workflow i{font-style:normal;color:#9db0b5}
.candidate-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.search-input{min-width:280px;max-width:380px;width:36%;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:#fff}
.row-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.icon-danger,.danger-btn{border:0;border-radius:9px;background:#fff0f0;color:#b73838;font-weight:800;cursor:pointer;padding:8px 10px}
.icon-danger:hover,.danger-btn:hover{background:#ffe2e2}
.danger-btn{background:#c74343;color:white}
.wait-label{font-size:10px;color:#946617;background:#fff2dc;padding:5px 7px;border-radius:999px}
.training-meta{display:flex;align-items:center;gap:8px}
.group-top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.confirm-text{font-weight:800;margin:5px 0 10px}
.danger-note{font-size:12px;color:#8b4c4c;background:#fff2f2;padding:10px;border-radius:10px}
@media(max-width:900px){
  .candidate-head{align-items:stretch;flex-direction:column}
  .search-input{width:100%;max-width:none;min-width:0}
}

.collapsible-panel{overflow:hidden}
.section-toggle,.group-toggle{
  width:100%;border:0;background:#fff;display:flex;align-items:center;justify-content:space-between;
  gap:16px;text-align:left;cursor:pointer
}
.section-toggle{padding:18px 20px}
.section-toggle:hover,.group-toggle:hover{background:#fbfdfd}
.section-toggle h2,.group-toggle h3{margin:0}
.section-toggle p{margin:4px 0 0;color:var(--muted);font-size:12px}
.toggle-icon{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;border-radius:8px;background:#f1f6f6;color:#55737d;transition:transform .2s ease}
.section-toggle.open .toggle-icon,.group-toggle.open .toggle-icon{transform:rotate(180deg)}
.hidden-section{display:none!important}
.section-body{border-top:1px solid var(--line)}
.section-actions{display:flex;justify-content:flex-end;padding:14px 16px 0}
.candidate-tools{display:flex;justify-content:flex-end;padding:14px 16px 0}
.group-toggle{padding:15px 16px}
.group-toggle h3{font-size:15px;margin-top:5px}
.group-summary{display:flex;align-items:center;gap:10px}
.group-body{border-top:1px solid var(--line)}
.group-actions-line{display:flex;justify-content:flex-end;padding:10px 16px 0}
.group-comment{padding:12px 16px 0}


/* ===== v9 Glass Gradient Theme ===== */
:root{
  --glass: rgba(8, 28, 42, .62);
  --glass-soft: rgba(11, 38, 54, .50);
  --glass-strong: rgba(5, 22, 34, .78);
  --glass-line: rgba(255,255,255,.14);
  --text: #f4fbff;
  --muted: rgba(229,244,249,.68);
  --accent: #4fd1d9;
  --accent2: #43d6a7;
  --danger: #ff7a7a;
  --shadow: 0 18px 50px rgba(0,0,0,.24);
}

html, body{
  min-height:100%;
}

body{
  margin:0;
  color:var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(66,190,255,.30), transparent 30%),
    radial-gradient(circle at 88% 14%, rgba(47,211,164,.28), transparent 28%),
    radial-gradient(circle at 72% 86%, rgba(36,163,215,.24), transparent 34%),
    linear-gradient(135deg, #0d6d92 0%, #0a857f 45%, #0b5f7f 100%);
  background-attachment: fixed;
}

body::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.12));
  z-index:-1;
}

.app{
  background:transparent!important;
}

.sidebar{
  background:rgba(4, 23, 35, .72)!important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-right:1px solid var(--glass-line)!important;
  color:var(--text)!important;
  box-shadow:12px 0 40px rgba(0,0,0,.12);
}

.brand-title, .side-footer b, .sidebar nav a{
  color:var(--text)!important;
}
.brand-sub, .side-footer span, .weekdays span{
  color:var(--muted)!important;
}

.sidebar nav a{
  border:1px solid transparent;
  border-radius:13px!important;
  transition:.18s ease;
}
.sidebar nav a:hover{
  background:rgba(255,255,255,.08)!important;
  border-color:rgba(255,255,255,.08);
}
.sidebar nav a.active{
  background:linear-gradient(135deg, rgba(71,191,220,.28), rgba(63,216,168,.23))!important;
  border-color:rgba(121,238,223,.26)!important;
  color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08);
}

.logo-dot{
  background:linear-gradient(135deg, #51c7ec, #43d6a7)!important;
  box-shadow:0 8px 28px rgba(48,218,190,.32);
}

.content{
  background:transparent!important;
}

.topbar,
.panel,
.stat,
.workflow,
.calendar-details,
.training-group,
.modal-card,
.public-card,
.answer{
  background:var(--glass)!important;
  border:1px solid var(--glass-line)!important;
  border-radius:20px!important;
  box-shadow:var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.topbar{
  padding:20px 22px!important;
}

.topbar h1,
.panel h2,
.training-group h3,
.public-card h1,
.modal-card h2,
.stat b,
.participant b,
.answer b{
  color:#fff!important;
}

.topbar p,
.panel p,
.stat span,
.group-comment,
.participant span,
.answer span,
.answer p,
.calendar-details,
.muted-small{
  color:var(--muted)!important;
}

.stat{
  min-height:92px;
}
.stat b{
  font-size:28px!important;
}

.primary{
  background:linear-gradient(135deg, #38b9df, #42d39e)!important;
  color:#fff!important;
  border:0!important;
  box-shadow:0 10px 26px rgba(45,202,177,.25);
}
.primary:hover{
  filter:brightness(1.07);
  transform:translateY(-1px);
}

.ghost, .mini, .search-input, input, select, textarea{
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:12px!important;
}
input::placeholder, textarea::placeholder{
  color:rgba(236,249,252,.48)!important;
}
select option{
  color:#0f2e3a;
  background:#f2fbfc;
}

.table-wrap{
  border-radius:16px;
  overflow:hidden;
}
table{
  color:var(--text)!important;
}
thead th{
  background:rgba(255,255,255,.06)!important;
  color:rgba(235,249,251,.72)!important;
  border-bottom:1px solid rgba(255,255,255,.12)!important;
}
tbody tr{
  background:transparent!important;
}
tbody tr:hover{
  background:rgba(255,255,255,.04)!important;
}
td{
  border-bottom:1px solid rgba(255,255,255,.08)!important;
  color:#f5fbfd!important;
}
td small{
  color:var(--muted)!important;
}

.stage,
.training-format,
.participants-count,
.questionnaire-ok,
.wait-label{
  box-shadow:none!important;
}
.training-format.online{
  background:rgba(60,167,225,.18)!important;
  color:#9fddff!important;
}
.training-format.office,
.questionnaire-ok{
  background:rgba(67,214,167,.16)!important;
  color:#aaf2d6!important;
}
.participants-count{
  background:rgba(255,255,255,.09)!important;
  color:#fff!important;
}
.wait-label{
  background:rgba(255,196,91,.15)!important;
  color:#ffd88d!important;
}

.group-toggle{
  background:transparent!important;
  color:var(--text)!important;
}
.group-toggle:hover{
  background:rgba(255,255,255,.045)!important;
}
.group-body{
  border-top:1px solid rgba(255,255,255,.10)!important;
}
.participant{
  border-bottom:1px solid rgba(255,255,255,.08)!important;
}

.calendar-box{
  border-top:1px solid rgba(255,255,255,.10)!important;
}
.calendar-nav,
.cal-day{
  color:var(--text)!important;
}
.calendar-nav{
  background:rgba(255,255,255,.07)!important;
  border:1px solid rgba(255,255,255,.11)!important;
}
.cal-day.has-events{
  background:linear-gradient(135deg, rgba(65,190,222,.28), rgba(64,211,163,.26))!important;
  color:#fff!important;
  border:1px solid rgba(111,233,217,.22);
}
.cal-day i{
  background:#45c9b0!important;
  color:#052f34!important;
}

.workflow{
  background:var(--glass-soft)!important;
}
.workflow-step b{
  background:linear-gradient(135deg, rgba(76,198,226,.30), rgba(65,210,165,.30))!important;
  color:#fff!important;
}
.workflow-step span, .workflow i{
  color:var(--text)!important;
}

.notice.good{
  background:rgba(53,191,137,.18)!important;
  color:#c8ffe9!important;
  border:1px solid rgba(83,221,166,.22)!important;
}
.notice.bad, .danger-note{
  background:rgba(225,87,87,.16)!important;
  color:#ffd0d0!important;
  border:1px solid rgba(255,112,112,.18)!important;
}
.icon-danger{
  background:rgba(226,77,77,.14)!important;
  color:#ffaaaa!important;
}
.danger-btn{
  background:linear-gradient(135deg, #d95757, #b33f54)!important;
}

.modal{
  background:rgba(1,15,24,.62)!important;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}

.public-body{
  background:
    radial-gradient(circle at 20% 20%, rgba(72,195,241,.28), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(62,218,169,.25), transparent 28%),
    linear-gradient(135deg, #0c698c, #087f79)!important;
}

a{
  color:#b9f6ef;
}
a:hover{
  color:#ffffff;
}

::-webkit-scrollbar{
  width:10px;
  height:10px;
}
::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.16);
  border-radius:999px;
}
::-webkit-scrollbar-track{
  background:transparent;
}

@media(max-width:900px){
  .sidebar{
    background:rgba(4,23,35,.84)!important;
  }
}


/* ===== v10 Fix: dashboard training preview ===== */
.dashboard-training-preview .preview-row{
  background:rgba(255,255,255,.06)!important;
  border:1px solid rgba(255,255,255,.12)!important;
  border-radius:16px!important;
  box-shadow:none!important;
  color:#f4fbff!important;
}

.dashboard-training-preview .preview-row:hover{
  background:rgba(255,255,255,.09)!important;
}

.dashboard-training-preview .preview-row b{
  color:#ffffff!important;
  font-weight:800!important;
}

.dashboard-training-preview .preview-row small{
  color:rgba(229,244,249,.68)!important;
}

.dashboard-training-preview .participants-count{
  background:rgba(79,209,217,.14)!important;
  border:1px solid rgba(79,209,217,.18)!important;
  color:#bff8f4!important;
}

.dashboard-training-preview{
  gap:12px!important;
}

.panel .mini{
  background:rgba(255,255,255,.08)!important;
  color:#f4fbff!important;
  border:1px solid rgba(255,255,255,.14)!important;
}

.panel .mini:hover{
  background:rgba(255,255,255,.13)!important;
  color:#ffffff!important;
}


/* ===== v14: contrast, overflow and login fixes ===== */

/* Login screen */
.auth-body{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  box-sizing:border-box;
  background:
    radial-gradient(circle at 18% 20%, rgba(73,192,239,.28), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(63,215,166,.24), transparent 28%),
    linear-gradient(135deg,#0b698b 0%,#0a827c 48%,#0a5d7d 100%)!important;
  color:#f4fbff!important;
}

.auth-shell{
  width:min(460px,100%);
  padding:34px;
  border-radius:24px!important;
  background:rgba(5,24,36,.72)!important;
  border:1px solid rgba(255,255,255,.14)!important;
  box-shadow:0 28px 80px rgba(0,0,0,.32)!important;
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
}

.auth-shell h1{
  margin:22px 0 8px;
  color:#ffffff!important;
  font-size:34px;
  line-height:1.1;
}

.auth-shell p{
  margin:0 0 24px;
  color:rgba(235,248,251,.70)!important;
  line-height:1.5;
}

.auth-shell form{
  display:grid;
  gap:16px;
}

.auth-shell label{
  display:grid;
  gap:8px;
  color:#eefbff!important;
  font-size:13px;
  font-weight:700;
}

.auth-shell input{
  width:100%;
  min-height:46px;
  box-sizing:border-box;
  padding:0 14px;
  background:rgba(255,255,255,.08)!important;
  color:#ffffff!important;
  border:1px solid rgba(255,255,255,.15)!important;
  border-radius:13px!important;
  outline:none;
}

.auth-shell input:focus{
  border-color:rgba(91,228,211,.60)!important;
  box-shadow:0 0 0 3px rgba(73,211,191,.12);
}

.auth-shell .primary{
  min-height:48px;
  margin-top:4px;
  width:100%;
}

.auth-accent{
  width:54px;height:54px;border-radius:16px;
  background:linear-gradient(135deg,#43bde6,#40d39f)!important;
  box-shadow:0 14px 34px rgba(61,209,179,.28);
}

.alert{
  margin-top:4px;
  padding:11px 13px;
  border-radius:12px;
  background:rgba(231,84,84,.15);
  color:#ffd1d1!important;
  border:1px solid rgba(255,122,122,.20);
}

/* Global text contrast */
body, .content, .sidebar, .panel, .modal-card, .public-card,
table, th, td, label, button, input, select, textarea{
  text-rendering:optimizeLegibility;
}

.content h1,
.content h2,
.content h3,
.content h4,
.panel h1,
.panel h2,
.panel h3,
.panel h4,
.modal-card h1,
.modal-card h2,
.modal-card h3{
  color:#ffffff!important;
}

.content p,
.panel p,
.modal-card p{
  color:rgba(234,248,251,.72)!important;
}

/* Prevent clipped / shrunk labels and controls */
button, a, .mini, .primary, .ghost, .icon-danger, .danger-btn{
  line-height:1.2;
}

input, select, textarea, button{
  font:inherit;
}

select{
  min-height:42px;
  padding-right:34px!important;
}

label{
  min-width:0;
}

.form-grid{
  align-items:start;
}

.form-grid > *{
  min-width:0;
}

.row-actions,
.user-actions-inline,
.participant-actions,
.group-top-actions{
  min-width:0;
}

.row-actions > *,
.user-actions-inline > *,
.participant-actions > *,
.group-top-actions > *{
  flex:0 0 auto;
}

/* Never force action text into tiny boxes */
.mini,
.icon-danger,
.danger-btn,
.ghost,
.primary{
  white-space:normal!important;
  overflow:visible!important;
  text-overflow:clip!important;
  min-width:max-content;
}

/* Tables stay usable instead of crushing cells */
.table-wrap{
  overflow-x:auto!important;
  -webkit-overflow-scrolling:touch;
}

table{
  min-width:900px;
}

th, td{
  vertical-align:middle;
}

td b, td small{
  overflow-wrap:anywhere;
}

/* User cards */
.user-row{
  min-width:0;
}
.user-main{
  min-width:180px!important;
  flex:1 1 auto;
}
.user-actions-inline{
  flex:0 1 auto;
}

/* Modal sizing */
.modal-card{
  width:min(680px, calc(100vw - 32px))!important;
  max-height:calc(100vh - 40px);
  overflow:auto;
  box-sizing:border-box;
}

.modal-card.small{
  width:min(560px, calc(100vw - 32px))!important;
}

/* Calendar and sidebar text */
.calendar-head b,
.calendar-details b,
.sidebar .brand-title,
.sidebar nav a,
.side-footer b{
  color:#ffffff!important;
}

.calendar-details span,
.sidebar .brand-sub,
.side-footer span{
  color:rgba(229,244,249,.68)!important;
}

/* Responsive */
@media(max-width:760px){
  .auth-shell{padding:26px 22px}
  .auth-shell h1{font-size:29px}
  .content{padding-left:14px!important;padding-right:14px!important}
}

/* ===== v15: text squeeze safeguards ===== */
.role-chip,
.badge-active,
.badge-off,
.stage,
.training-format,
.participants-count,
.questionnaire-ok,
.wait-label{
  line-height:1.15!important;
  height:auto!important;
  min-height:30px!important;
  padding:7px 10px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  white-space:nowrap!important;
  overflow:visible!important;
  text-overflow:clip!important;
  flex:0 0 auto!important;
}

.user-meta{
  gap:10px!important;
  align-items:center!important;
}

.user-main h3,
.user-main p{
  line-height:1.35!important;
}

/* ===== v16: consistent inner gutters everywhere ===== */
.panel,
.topbar,
.modal-card,
.public-card{
  box-sizing:border-box!important;
}

.panel > .panel-head,
.panel > .panel-topline,
.panel > .page-section-head{
  padding-left:22px!important;
  padding-right:22px!important;
}

.panel > .table-wrap{
  margin-left:0!important;
  margin-right:0!important;
}

.panel h1,
.panel h2,
.panel h3,
.panel p,
.panel span,
.panel label,
.topbar h1,
.topbar p{
  max-width:100%;
  overflow-wrap:break-word;
}

.panel > :first-child{
  margin-top:0;
}

.panel > :last-child{
  margin-bottom:0;
}

.content{
  min-width:0;
}

.users-page,
.crm-view,
.panel,
.user-row,
.training-group,
.participant{
  min-width:0;
}

.user-row{
  margin:0!important;
}

.user-main{
  padding-left:0!important;
}

@media(max-width:700px){
  .panel > .panel-head,
  .panel > .panel-topline,
  .panel > .page-section-head,
  .users-toolbar,
  .users-list{
    padding-left:16px!important;
    padding-right:16px!important;
  }
}

/* ===== v18 Filters ===== */
.filters-bar{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  flex-wrap:wrap!important;
}

.filters-bar .search-input{
  flex:1 1 280px!important;
  min-width:220px!important;
  max-width:none!important;
}

.filters-bar select{
  flex:0 1 190px!important;
  min-width:150px!important;
  max-width:220px!important;
}

.training-filter-bar{
  padding:0 20px 16px!important;
}

@media(max-width:760px){
  .filters-bar{
    align-items:stretch!important;
  }
  .filters-bar .search-input,
  .filters-bar select,
  .filters-bar .mini{
    width:100%!important;
    max-width:none!important;
  }
}

/* ===== v19 Date filters ===== */
.filters-bar input[type="date"]{
  flex:0 1 165px!important;
  min-width:150px!important;
  max-width:180px!important;
}
@media(max-width:760px){
  .filters-bar input[type="date"]{
    width:100%!important;
    max-width:none!important;
  }
}

/* ===== v20 final polish ===== */
.filters-bar{
  width:100%;
  box-sizing:border-box;
}
.filter-date-wrap{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:42px!important;
  padding:0 12px!important;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.06)!important;
  color:rgba(244,251,255,.78)!important;
  font-size:12px!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
.filter-date-wrap span{
  opacity:.8;
}
.filter-date-wrap input[type="date"]{
  min-width:138px!important;
  width:138px!important;
  max-width:138px!important;
  height:38px!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.filters-bar select,
.filters-bar input,
.filters-bar button{
  min-height:42px!important;
}
.candidate-tools{
  overflow:visible!important;
}
@media(max-width:760px){
  .filter-date-wrap{
    width:100%!important;
    justify-content:space-between!important;
  }
  .filter-date-wrap input[type="date"]{
    width:auto!important;
    max-width:none!important;
    flex:1 1 auto!important;
  }
}
