
:root{
 --bg:#edf2f8;--panel:#ffffff;--text:#102742;--muted:#6f829a;--primary:#c81a46;--primary2:#1a3b86;
 --line:#dbe5f0;--shadow:0 16px 44px rgba(24,52,104,.10);--radius:24px;--side1:#071a46;--side2:#0b245c;
 --success:#eaf8f0;--success-text:#18653f;--error:#fff0f0;--error-text:#9a1d1d;
}
*{box-sizing:border-box}html,body{margin:0;padding:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:linear-gradient(180deg,#f5f8fc,#edf2f8);color:var(--text)}
a{text-decoration:none;color:inherit}
.shell{display:flex;min-height:100vh}
.sidebar{width:310px;background:radial-gradient(circle at bottom left,rgba(102,127,255,.14),transparent 22%),linear-gradient(180deg,var(--side1),#0b1b48 52%,var(--side2));color:#fff;padding:28px 22px;display:flex;flex-direction:column;gap:18px;position:sticky;top:0;height:100vh;overflow:auto;box-shadow:8px 0 30px rgba(5,14,40,.12)}
.brand-box{display:flex;align-items:center;gap:14px;padding:6px 6px 20px;border-bottom:1px solid rgba(255,255,255,.12)}
.brand-icon{width:54px;height:54px;border-radius:18px;background:linear-gradient(135deg,#f8ced9,#e37b96);display:flex;align-items:center;justify-content:center;color:#0b1a44;font-weight:800}
.brand-title{font-size:34px;font-weight:800;letter-spacing:-.04em}.brand-sub{color:#90a8ce}
.menu-group{display:flex;flex-direction:column;gap:8px}.menu-title{text-transform:uppercase;letter-spacing:.18em;color:#8ea6cd;font-size:12px;margin:10px 8px 8px}
.menu-link{display:block;padding:13px 16px;border-radius:18px;color:#f7fbff;font-weight:600;transition:.18s;background:transparent}
.menu-link:hover{background:rgba(255,255,255,.08)} .menu-link.active{background:linear-gradient(180deg,rgba(126,155,255,.24),rgba(177,195,255,.12));box-shadow:inset 0 0 0 1px rgba(165,188,255,.22)}
.menu-link.secondary{background:rgba(255,255,255,.08)} .menu-link.danger{background:rgba(124,34,64,.35)}
.sidebar-bottom{margin-top:auto;display:flex;flex-direction:column;gap:12px}
.profile-card{display:flex;gap:12px;align-items:center;padding:14px;border-radius:22px;background:rgba(255,255,255,.09)}
.avatar{width:42px;height:42px;border-radius:999px;background:#d8e7ff;color:#234fcb;font-weight:800;display:flex;align-items:center;justify-content:center}
.profile-name{font-weight:700}.profile-role{font-size:13px;color:#98afd2}
.main-wrap{flex:1;min-width:0}.topbar{height:84px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;background:rgba(255,255,255,.55);backdrop-filter:blur(12px);border-bottom:1px solid rgba(180,194,214,.45);position:sticky;top:0;z-index:10}
.topbar-title{font-size:30px;font-weight:800;letter-spacing:-.04em}.topbar-user{color:var(--muted);font-weight:600}.mobile-menu-btn{display:none}
.content{padding:30px}
.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin-bottom:20px}.page-head h1{margin:0;font-size:42px;letter-spacing:-.05em}.page-head p{margin:6px 0 0;color:var(--muted)}
.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.card,.panel{background:rgba(255,255,255,.8);border:1px solid rgba(214,224,237,.9);box-shadow:var(--shadow);border-radius:var(--radius)}
.stat-card{padding:22px 24px}.stat-label{color:var(--muted);font-weight:600}.stat-value{margin-top:16px;font-size:52px;font-weight:800;letter-spacing:-.05em}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:18px}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.mt-20{margin-top:20px}.mt-24{margin-top:24px}
.panel{padding:22px 22px}.panel h2,.panel h3{margin:0 0 18px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-grid.single{grid-template-columns:1fr}.form-group{display:flex;flex-direction:column;gap:8px}.form-group.full{grid-column:1/-1}
label{font-size:14px;font-weight:700;color:#284463}input,select,textarea{width:100%;padding:14px 16px;border-radius:16px;border:1px solid var(--line);background:#f7faff;color:var(--text);font:inherit;outline:none}
input:focus,select:focus,textarea:focus{border-color:#df6c89;box-shadow:0 0 0 4px rgba(47,107,255,.12)}textarea{min-height:120px;resize:vertical}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:13px 18px;border:none;border-radius:16px;background:linear-gradient(135deg,var(--primary),#5a8dff);color:#fff;font-weight:700;cursor:pointer;box-shadow:0 10px 26px rgba(47,107,255,.28)}
.btn.secondary{background:#e9eff8;color:#183763;box-shadow:none}.btn.danger{background:#7a163a}.btn.small{padding:10px 14px;border-radius:14px;font-size:14px}
.actions{display:flex;gap:10px;flex-wrap:wrap}
.alert{padding:14px 18px;border-radius:16px;margin-bottom:18px;font-weight:600}.alert-success{background:var(--success);color:var(--success-text)}.alert-error{background:var(--error);color:var(--error-text)}
.table-wrap{overflow:auto}.table{width:100%;border-collapse:separate;border-spacing:0 10px}.table thead th{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#7088a5;text-align:left;padding:0 14px 8px}.table tbody tr{background:rgba(248,251,255,.95);box-shadow:0 7px 18px rgba(28,59,116,.05)}.table tbody td{padding:16px 14px}.table tbody tr td:first-child{border-radius:16px 0 0 16px}.table tbody tr td:last-child{border-radius:0 16px 16px 0}
.badge{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;background:#fff1f4;color:#23447e;font-weight:700;font-size:13px}
.dot{width:10px;height:10px;border-radius:999px;display:inline-block}
.login-wrap{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at top left,#dce9ff,transparent 28%),linear-gradient(180deg,#f6f9fd,#eef3f9)}
.login-card{width:min(460px,100%);padding:34px;background:rgba(255,255,255,.86);border:1px solid rgba(216,226,239,.95);box-shadow:var(--shadow);border-radius:30px}
.login-brand{display:flex;align-items:center;gap:14px;margin-bottom:18px}.login-brand .brand-icon{flex:none}.login-card h1{margin:0;font-size:42px;letter-spacing:-.05em}.muted{color:var(--muted)}
.board{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.column{padding:18px}.chip{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#fff1f4;color:#a9163d;font-weight:700;font-size:13px}
.assignment-card{padding:14px;border-radius:18px;background:#f8fbff;border:1px solid var(--line);margin-bottom:12px}
.empty-state{padding:30px;text-align:center;color:var(--muted)}
@media (max-width: 1180px){.cards{grid-template-columns:repeat(2,1fr)}.grid-2,.grid-3,.board{grid-template-columns:1fr}.sidebar{position:fixed;left:-320px;z-index:50;transition:left .2s}.sidebar.open{left:0}.mobile-menu-btn{display:inline-flex;border:none;background:#fff4f6;border-radius:14px;padding:12px;cursor:pointer}.content{padding:18px}.topbar-title{font-size:24px}}
@media (max-width: 700px){.cards{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.topbar{padding:0 16px}.page-head h1{font-size:32px}}


/* Dagstart drag-and-drop planning */
.daystart-toolbar{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-bottom:22px}
.daystart-date-form{display:flex;align-items:end;gap:14px;flex-wrap:wrap}.form-group.compact{min-width:260px}.daystart-help{display:flex;flex-direction:column;gap:4px;color:var(--muted);max-width:520px}.daystart-help strong{color:var(--text)}
.daystart-layout{display:grid;grid-template-columns:minmax(360px,430px) 1fr;gap:20px;align-items:start}.section-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:18px}.section-title-row h2{margin-bottom:6px}.section-title-row p{margin:0}
.available-panel{position:sticky;top:104px;max-height:calc(100vh - 128px);overflow:auto}.available-area-list{display:flex;flex-direction:column;gap:16px}.area-card-group{border:1px solid var(--line);border-radius:20px;background:rgba(248,251,255,.84);padding:14px}.area-card-head{display:flex;align-items:center;gap:10px;margin-bottom:12px}.area-count{margin-left:auto;font-size:12px;color:var(--muted);font-weight:700}
.draggable-card-list{display:flex;flex-direction:column;gap:10px}.service-drag-card{cursor:grab;padding:14px;border-radius:18px;background:#fff;border:1px solid rgba(203,217,235,.9);box-shadow:0 10px 26px rgba(24,52,104,.08);transition:transform .16s,box-shadow .16s,border-color .16s}.service-drag-card:hover{transform:translateY(-2px);box-shadow:0 16px 32px rgba(24,52,104,.12);border-color:#9bbcff}.service-drag-card:active{cursor:grabbing}.service-drag-card.is-dragging{opacity:.45}.drag-card-top{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.walk-count{white-space:nowrap;font-size:12px;font-weight:800;color:#a9163d;background:#fff1f4;border-radius:999px;padding:6px 9px}.drag-card-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px;color:var(--muted);font-size:13px}
.roster-drop-panel{min-width:0}.shift-drop-board{display:grid;grid-template-columns:repeat(3,minmax(260px,1fr));gap:16px}.shift-lane{border:1px solid var(--line);border-radius:22px;background:rgba(248,251,255,.7);padding:14px;min-height:320px}.shift-lane-head h3{margin:0 0 14px}.person-drop-card{border:1px dashed #b8c8df;background:rgba(255,255,255,.78);border-radius:20px;padding:14px;margin-bottom:12px;transition:background .16s,border-color .16s,box-shadow .16s,transform .16s}.person-drop-card.drag-over{background:#fff5f7;border-color:#c81a46;box-shadow:0 0 0 4px rgba(47,107,255,.12);transform:scale(1.01)}.person-drop-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}.drop-hint{font-size:12px;font-weight:800;color:#c81a46;background:#fff5f7;border-radius:999px;padding:6px 9px}.small-text{font-size:12px}.assigned-list{display:flex;flex-direction:column;gap:10px}.empty-drop{padding:16px;border-radius:16px;background:#f2f6fc;color:var(--muted);text-align:center;font-size:13px}.assigned-mini-card{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:12px;border-radius:16px;background:#fff;border:1px solid var(--line)}.assigned-meta{display:flex;align-items:center;gap:7px;margin-top:6px;color:var(--muted);font-size:12px}.compact-empty{padding:18px}
@media (max-width: 1280px){.daystart-layout{grid-template-columns:1fr}.available-panel{position:static;max-height:none}.shift-drop-board{grid-template-columns:1fr}}
@media (max-width: 760px){.daystart-toolbar{align-items:stretch;flex-direction:column}.daystart-date-form{display:grid;grid-template-columns:1fr}.form-group.compact{min-width:0}.section-title-row{flex-direction:column}.drag-card-top,.assigned-mini-card,.person-drop-head{flex-direction:column;align-items:stretch}.walk-count{align-self:flex-start}}


/* =========================================================
   Dagstart board v2 - strakke drag/drop layout
   ========================================================= */
.daystart-page-head{margin-bottom:18px}
.daystart-page-head h1{font-size:40px}
.daystart-control-card{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:22px;
    padding:18px 20px;
    margin-bottom:22px;
    border:1px solid rgba(203,217,235,.95);
    border-radius:26px;
    background:linear-gradient(135deg,rgba(255,255,255,.92),rgba(245,249,255,.82));
    box-shadow:0 18px 45px rgba(18,42,84,.08);
}
.daystart-filter{
    display:flex;
    align-items:end;
    gap:14px;
    min-width:360px;
}
.daystart-filter-field{
    display:flex;
    flex-direction:column;
    gap:8px;
    flex:1;
}
.daystart-filter-field label{
    font-size:13px;
    font-weight:800;
    color:#284463;
}
.daystart-filter-field input{
    height:50px;
}
.daystart-summary{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    justify-content:flex-end;
}
.summary-pill{
    min-width:130px;
    padding:12px 16px;
    border-radius:20px;
    background:#fff7f9;
    border:1px solid #dce8fa;
}
.summary-pill strong{
    display:block;
    font-size:24px;
    line-height:1;
    color:#153764;
}
.summary-pill span{
    display:block;
    margin-top:5px;
    font-size:12px;
    color:#6e829d;
    font-weight:700;
}
.summary-note{
    max-width:360px;
    color:#647893;
    font-size:14px;
}
.daystart-board-v2{
    display:grid;
    grid-template-columns:420px minmax(0,1fr);
    gap:22px;
    align-items:start;
}
.available-board,
.roster-board{
    border:1px solid rgba(203,217,235,.95);
    border-radius:28px;
    background:rgba(255,255,255,.86);
    box-shadow:0 24px 55px rgba(18,42,84,.09);
}
.available-board{
    position:sticky;
    top:104px;
    max-height:calc(100vh - 125px);
    overflow:auto;
    padding:20px;
}
.roster-board{
    padding:20px;
    min-width:0;
}
.board-panel-title{
    display:flex;
    justify-content:space-between;
    gap:16px;
    margin-bottom:18px;
}
.board-panel-title h2{
    margin:0;
    font-size:24px;
    letter-spacing:-.035em;
}
.board-panel-title p{
    margin:5px 0 0;
    color:#71849d;
}
.area-stack{
    display:flex;
    flex-direction:column;
    gap:16px;
}
.area-section{
    border:1px solid #dce8f7;
    border-radius:24px;
    background:linear-gradient(180deg,#fbfdff,#f5f8fd);
    padding:14px;
}
.area-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:12px;
}
.area-name-wrap{
    display:flex;
    align-items:center;
    gap:10px;
}
.area-color-dot{
    width:14px;
    height:14px;
    border-radius:999px;
    box-shadow:0 0 0 4px rgba(30,64,120,.06);
}
.area-name-wrap strong{
    display:block;
    font-size:15px;
}
.area-name-wrap small{
    display:block;
    margin-top:2px;
    color:#7387a1;
    font-weight:700;
}
.available-cards{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.service-card-draggable{
    cursor:grab;
    user-select:none;
    padding:14px;
    border-radius:20px;
    background:#fff;
    border:1px solid #d7e4f5;
    box-shadow:0 10px 28px rgba(26,54,104,.075);
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, opacity .16s ease;
}
.service-card-draggable:hover{
    transform:translateY(-2px);
    border-color:#9fbbff;
    box-shadow:0 18px 34px rgba(26,54,104,.12);
}
.service-card-draggable:active{cursor:grabbing}
.service-card-draggable.dragging{
    opacity:.42;
    transform:scale(.98);
}
.service-card-main{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.service-card-main h3{
    margin:0;
    font-size:16px;
    line-height:1.25;
}
.service-card-sub{
    display:flex;
    flex-direction:column;
    gap:3px;
    margin-top:8px;
    color:#71849d;
    font-size:13px;
    font-weight:600;
}
.walk-badge{
    min-width:62px;
    padding:9px 10px;
    border-radius:16px;
    background:linear-gradient(135deg,#fff1f4,#e3ecff);
    color:#1e4da6;
    text-align:center;
    font-weight:900;
}
.walk-badge small{
    display:block;
    margin-top:2px;
    font-size:10px;
    letter-spacing:.04em;
    text-transform:uppercase;
}
.shift-columns{
    display:grid;
    grid-template-columns:repeat(3,minmax(240px,1fr));
    gap:16px;
}
.shift-column{
    min-height:500px;
    border:1px solid #dce8f7;
    border-radius:26px;
    background:linear-gradient(180deg,#f8fbff,#f1f6fd);
    padding:14px;
}
.shift-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:4px 4px 14px;
}
.shift-header h3{
    margin:0;
    font-size:19px;
    letter-spacing:-.02em;
}
.shift-header span{
    display:inline-flex;
    margin-top:4px;
    color:#7287a1;
    font-size:13px;
    font-weight:700;
}
.people-stack{
    display:flex;
    flex-direction:column;
    gap:12px;
}
.person-drop-zone{
    border:1px dashed #aec0d7;
    border-radius:22px;
    background:rgba(255,255,255,.86);
    padding:13px;
    min-height:128px;
    transition:background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.person-drop-zone.drop-active{
    border-color:#c81a46;
    background:#fff5f7;
    box-shadow:0 0 0 5px rgba(47,107,255,.12), 0 18px 36px rgba(27,69,151,.12);
    transform:translateY(-1px);
}
.person-header{
    display:flex;
    align-items:center;
    gap:11px;
    margin-bottom:12px;
}
.person-avatar{
    width:42px;
    height:42px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:none;
    background:linear-gradient(135deg,#dbe8ff,#8cb7ff);
    color:#102b5e;
    font-weight:900;
}
.person-info{
    min-width:0;
    flex:1;
}
.person-info strong{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.person-info span{
    display:block;
    margin-top:3px;
    color:#71849d;
    font-size:12px;
    font-weight:700;
}
.drop-label{
    padding:6px 9px;
    border-radius:999px;
    background:#fff1f4;
    color:#245cc7;
    font-size:11px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.06em;
}
.person-assignments{
    display:flex;
    flex-direction:column;
    gap:10px;
}
.drop-placeholder{
    padding:14px;
    border-radius:16px;
    background:#f2f6fc;
    color:#7287a1;
    text-align:center;
    font-size:13px;
    font-weight:700;
}
.assigned-card{
    padding:12px;
    border-radius:18px;
    background:#fff;
    border:1px solid #dbe7f5;
    box-shadow:0 8px 18px rgba(26,54,104,.06);
}
.assigned-title-row{
    display:flex;
    justify-content:space-between;
    align-items:start;
    gap:8px;
}
.status-dot{
    width:11px;
    height:11px;
    border-radius:999px;
    margin-top:4px;
}
.assigned-meta{
    margin-top:7px;
    color:#71849d;
    font-size:12px;
    font-weight:700;
}
.unlink-btn{
    width:100%;
    margin-top:10px;
    box-shadow:none;
}
.empty-shift{
    padding:22px;
    border-radius:18px;
    background:#f2f6fc;
    color:#71849d;
    text-align:center;
    font-weight:700;
}
.polished-empty{
    border-radius:22px;
    background:#f5f8fd;
    border:1px dashed #cad9ec;
}
.mobile-assign-hint{
    display:none;
    margin-top:14px;
    color:#71849d;
    font-size:13px;
}
@media (max-width: 1450px){
    .daystart-board-v2{grid-template-columns:360px minmax(0,1fr)}
    .shift-columns{grid-template-columns:1fr}
    .shift-column{min-height:0}
}
@media (max-width: 1050px){
    .daystart-control-card{align-items:stretch;flex-direction:column}
    .daystart-summary{justify-content:flex-start}
    .daystart-filter{min-width:0;width:100%}
    .daystart-board-v2{grid-template-columns:1fr}
    .available-board{position:static;max-height:none}
}
@media (max-width: 700px){
    .daystart-filter{display:grid;grid-template-columns:1fr}
    .daystart-summary{display:grid;grid-template-columns:1fr 1fr}
    .summary-note{grid-column:1/-1}
    .service-card-main{flex-direction:column}
    .walk-badge{text-align:left}
    .mobile-assign-hint{display:block}
}
