:root{
    --bg:#f5f7fa;
    --card:#ffffff;
    --text:#1b2430;
    --muted:#687386;
    --line:#d8dee8;
    --accent:#2458a6;
    --accent-dark:#173f7b;
    --danger:#b33434;
    --shadow:0 8px 28px rgba(20,35,60,.08);
}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,Segoe UI,Arial,sans-serif;font-size:14px}
a{color:var(--accent);text-decoration:none}
.topbar{
    height:58px;background:#16253a;color:#fff;display:flex;align-items:center;justify-content:space-between;
    padding:0 22px;position:sticky;top:0;z-index:30;box-shadow:0 2px 8px rgba(0,0,0,.12)
}
.topbar a{color:#fff;margin-left:18px}
.brand{font-weight:700;font-size:18px;margin-left:0!important}
.muted-light{color:#bdc9d8}
.company-switcher{display:inline-flex;align-items:center;gap:7px;margin-left:18px;color:#dbe5f2;font-size:12px}
.company-switcher select{min-width:190px;padding:6px 8px;border-color:#64748b;border-radius:5px;font-size:12px}
.container{max-width:1600px;margin:0 auto;padding:22px}
.card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:18px;box-shadow:var(--shadow);margin-bottom:18px}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:16px}
.page-head.compact{margin-bottom:6px}
h1{font-size:24px;margin:0 0 6px}
h2{font-size:18px;margin:0 0 14px}
h3{font-size:16px;margin:20px 0 8px}
.muted,.company-meta{color:var(--muted)}
.company-meta{margin:2px 0}
.login-wrap{min-height:calc(100vh - 100px);display:grid;place-items:center}
.login-card{width:min(420px,100%);padding:28px}
.login-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#edf1f6;border-radius:8px;margin:18px 0}
.login-tab{text-align:center;padding:9px 8px;border-radius:6px;color:var(--muted);font-weight:700}
.login-tab.active{background:white;color:var(--accent);box-shadow:0 1px 4px rgba(20,35,60,.12)}
label{display:flex;flex-direction:column;gap:6px;font-weight:600}
input,select,textarea{
    border:1px solid #bcc6d4;border-radius:7px;padding:9px 10px;font:inherit;background:white;color:var(--text)
}
input:focus,select:focus,textarea:focus{outline:2px solid rgba(36,88,166,.18);border-color:var(--accent)}
.login-card form{display:grid;gap:14px}
.btn{
    display:inline-flex;align-items:center;justify-content:center;border:1px solid #b9c4d2;background:white;color:var(--text);
    padding:9px 13px;border-radius:7px;cursor:pointer;font-weight:600
}
.btn:hover{background:#f2f5f9}
.btn.primary{background:var(--accent);color:white;border-color:var(--accent)}
.btn.primary:hover{background:var(--accent-dark)}
.btn.danger{color:white;background:var(--danger);border-color:var(--danger)}
.btn.mini{padding:6px 9px;font-size:12px}
.btn.full{width:100%}
.demo-box{margin-top:18px;background:#f3f6fb;border:1px solid #dbe4f0;padding:12px;border-radius:8px;line-height:1.6}
.alert{padding:10px 12px;border-radius:7px;margin:10px 0}
.alert.error{background:#fff0f0;border:1px solid #e5b5b5;color:#8c2424}
.controls{display:grid;grid-template-columns:minmax(430px,1.5fr) auto auto;align-items:end;gap:18px}
.inline-form{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.inline-form label{min-width:90px}
.controls > .inline-form{min-height:58px;align-content:end}
.controls > .inline-form .btn{min-height:39px}
.controls .status-help{align-self:end;max-width:260px}
.controls > .inline-form:first-child{display:grid;grid-template-columns:auto auto minmax(160px,1fr);align-items:end}
.dashboard-controls{padding:10px 12px}
.dashboard-controls > .inline-form{min-height:42px;gap:8px}
.dashboard-controls > .inline-form .btn{min-height:32px;padding:6px 10px;font-size:12px;border-radius:5px}
.dashboard-controls .profile-info{font-size:12px}
.profile-info{color:var(--muted)}
.dot{display:inline-block;width:7px;height:7px;background:#2d9c5a;border-radius:50%;margin:0 7px}
.info-strip{
    background:#eef4ff;border:1px solid #cfdcf2;color:#29466e;border-radius:8px;padding:10px 12px;margin-bottom:14px
}
.report-heading{text-align:center;margin:22px auto 14px;max-width:none;overflow-x:auto}
.report-heading h2{font-size:18px;line-height:1.35;margin:0;font-weight:700;white-space:nowrap}
.report-heading p{margin:6px 0 0;color:var(--muted);font-weight:700;text-transform:none}
.report-heading p strong{font-weight:700}
.badge{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:700;letter-spacing:.03em}
.badge.open{background:#e8f4ff;color:#1d5c91}
.badge.review{background:#fff3d6;color:#8a5b00}
.badge.closed{background:#e9f7ee;color:#22683a}
.table-scroll{overflow:auto;border:1px solid var(--line);background:white;border-radius:8px}
.table-wrap{overflow-x:auto;max-width:100%}
.holiday-year{border:1px solid var(--line);border-radius:8px;margin-bottom:10px;background:#fafbfd;overflow:hidden}
.holiday-year summary{cursor:pointer;padding:12px 14px;font-weight:700;list-style-position:inside}
.holiday-year summary:hover{background:#f2f5f9}
.holiday-year[open] summary{border-bottom:1px solid var(--line);background:#f2f5f9}
.holiday-year .table-wrap{border:0;border-radius:0}
.superadmin-company-table{min-width:1500px;width:100%;border-collapse:separate;border-spacing:0}
.superadmin-company-table th,.superadmin-company-table td{padding:10px;vertical-align:top;text-align:left;border-right:1px solid #d5dbe4;border-bottom:1px solid #d5dbe4}
.superadmin-company-table th{background:#e9edf2;white-space:nowrap}
.superadmin-company-table th:nth-child(3),.superadmin-company-table td:nth-child(3){min-width:520px;width:38%}
.superadmin-company-table td:nth-child(3) textarea{display:block;width:100%;min-width:480px;resize:vertical}
.superadmin-company-table td:nth-child(1) input{width:210px}
.superadmin-company-table td:nth-child(2) input{width:190px}
.superadmin-company-table th:last-child,.superadmin-company-table td:last-child{min-width:112px}
.company-actions{display:flex;flex-direction:column;align-items:stretch;gap:6px}
.company-actions .btn{width:100%;white-space:nowrap}
.company-delete-form{margin:0}
.pontaj-table,.admin-grid,.simple-table{border-collapse:separate;border-spacing:0;min-width:max-content;width:100%}
.pontaj-table th,.pontaj-table td,.admin-grid th,.admin-grid td,.simple-table th,.simple-table td{
    border-right:1px solid #d5dbe4;border-bottom:1px solid #d5dbe4;text-align:center;vertical-align:middle
}
.pontaj-table th,.admin-grid th,.simple-table th{
    position:sticky;top:0;z-index:5;background:#e9edf2;padding:7px 5px;font-size:12px
}
.pontaj-table td{padding:2px;min-width:40px;height:48px;font-size:11px}
.pontaj-table th{padding-left:3px;padding-right:3px}
.pontaj-table th{padding-top:3px;padding-bottom:3px}
.pontaj-table thead th:not(.sticky-col){position:static!important;top:auto!important}
.weekday-cell{font-size:11px!important;font-weight:700}
.metric-cell{font-size:8px!important;font-weight:600}
.summary-heading{font-size:11px!important;font-weight:700;vertical-align:middle!important}
.summary-label{font-size:11px!important;font-weight:700;vertical-align:middle!important}
.pontaj-table th.weekend-empty,.pontaj-table td.weekend-empty{width:26px;min-width:26px;padding-left:2px;padding-right:2px}
.employee-col{min-width:160px!important;max-width:160px;text-align:left!important}
.sticky-col{position:sticky!important;left:0;z-index:7!important;background:#f7f9fb!important}
thead .sticky-col{z-index:9!important;background:#e9edf2!important}
.employee-name{font-weight:700;padding-left:8px!important}
.hours{font-size:12px;font-weight:700;margin-bottom:0}
.interval{line-height:1.1;white-space:nowrap}
.interval-pair.multiple{position:relative;display:block;padding-left:3px;margin:0;line-height:1.05}
.interval-pair.multiple::before{content:"";position:absolute;top:50%;left:3px;width:2px;height:12.1px;box-sizing:border-box;transform:translateY(-50%);border:1px solid #6b7280;border-right:0}
.empty{color:#a8b0bd}
.summary{font-weight:700;background:#f8fafc}
.summary-current{background:#eef0f2!important;color:#6b7280}
.today-col{background:#dbeafe!important}
.signature-cell{cursor:pointer}
.signature-popover{position:fixed;z-index:20;max-width:min(360px,calc(100vw - 24px));padding:8px 10px;border:1px solid #b8c4d1;border-radius:5px;background:#fff;color:#263342;box-shadow:0 4px 14px rgba(31,41,55,.18);font-size:12px;line-height:1.35;white-space:pre-line;pointer-events:none}
.day-type{font-weight:700;font-size:10px}
.admin-months-panel{padding:4px 0 10px}
.admin-months-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:0 0 14px}
.admin-months-heading h2{margin:2px 0 0}
.section-kicker{color:#64748b;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}
.month-count{color:#64748b;font-size:12px}
.admin-month-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:10px}
.month-card{display:flex;flex-direction:column;gap:7px;min-height:108px;box-sizing:border-box;border:1px solid var(--line);border-top:3px solid #cbd5e1;padding:12px 13px 11px;border-radius:7px;background:#fafbfd;color:var(--text);transition:border-color .15s,box-shadow .15s,transform .15s}
.month-card:hover{border-color:#7aa2d6;box-shadow:0 5px 14px rgba(31,41,55,.10);transform:translateY(-2px)}
.month-card.current-month{border-top-color:#2563eb;background:#f5f9ff}
.month-card-top,.month-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px}
.month-number{color:#2563eb;font-size:20px;font-weight:800;line-height:1}
.month-year{color:#64748b;font-size:12px;font-weight:700}
.month-name{font-size:16px;line-height:1.2}
.month-card-bottom{margin-top:auto}
.month-open{color:#64748b;font-size:11px;font-weight:700}
.month-card:hover .month-open{color:#1d4ed8}
.status-help{color:#64748b;font-size:11px;line-height:1.35}
.profile-admin-list{display:grid;gap:18px}
.profile-admin-section{margin:24px 0}
.profile-section-heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin:0 0 12px}
.profile-section-heading h2{margin:2px 0 0}
.employee-list-actions{display:flex;align-items:center;gap:10px}
.profile-admin-card{border:1px solid var(--line);border-radius:7px;background:#fafbfd;padding:20px 22px}
.profile-admin-head{display:flex;justify-content:space-between;align-items:start;gap:16px;margin-bottom:18px}
.profile-admin-head strong{font-size:15px}
.profile-admin-meta{display:block;color:var(--muted);font-size:12px;margin-top:3px}
.profile-admin-form{display:grid;grid-template-columns:minmax(220px,340px) auto;gap:18px 24px;align-items:end}
.profile-admin-form label{display:grid;gap:4px;color:var(--muted);font-size:12px;font-weight:600}
.profile-admin-form input[type="time"],.profile-admin-form input[type="number"],.profile-admin-form input[type="password"]{width:100%;box-sizing:border-box}
.profile-active{display:flex!important;align-items:center;grid-template-columns:auto 1fr;gap:6px!important;height:34px}
.profile-active input{accent-color:#2563eb}
.profile-save{white-space:nowrap}
.save-success{align-self:center;color:#18794e;font-size:12px;font-weight:700}
.profile-delete-form{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.profile-delete-success{margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.profile-employee-schedules{display:grid;grid-column:1 / -1;gap:0;margin-top:2px;padding:14px 16px 4px;border:1px solid var(--line);border-radius:6px;background:#fff}
.profile-employee-schedules>strong{display:block;color:var(--muted);font-size:11px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:2px}
.profile-employee-schedule{display:grid;grid-template-columns:minmax(170px,1fr) 82px 118px minmax(280px,1.7fr) 88px;gap:14px;align-items:center;padding:12px 0;border-top:1px solid #e5eaf0}
.profile-employee-schedule:nth-of-type(odd){background:#fbfcfe}
.profile-employee-schedule>span{color:var(--text);font-size:13px;font-weight:700}
.profile-employee-schedule>label{gap:3px!important;max-width:none}
.profile-schedule-list{display:grid;gap:7px}
.profile-schedule-list .employee-schedule-row{grid-template-columns:minmax(74px,1fr) auto minmax(74px,1fr) auto;gap:7px}
.profile-schedule-list .employee-schedule-row button{font-size:11px;padding:5px 7px}
.add-profile-schedule{align-self:center;justify-self:start}
.user-admin-list{display:grid;gap:8px}
.user-admin-card{display:flex;align-items:end;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:7px;background:#fafbfd;padding:12px 14px}
.user-admin-form{display:grid;grid-template-columns:minmax(140px,1fr) minmax(180px,1.3fr) auto auto;gap:10px;align-items:end;flex:1}
.user-admin-form label,.new-user-form label{display:grid;gap:4px;color:var(--muted);font-size:12px;font-weight:600}
.user-delete{flex:none}
.new-user-form{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;align-items:end}
.new-user-form input{width:100%;box-sizing:border-box}
.new-profile-form{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;align-items:end}
.new-profile-form label{display:grid;gap:4px;color:var(--muted);font-size:12px;font-weight:600}
.new-profile-form input,.new-profile-form select{width:100%;box-sizing:border-box}
.employee-admin-list{display:grid;gap:10px}
.employee-admin-card{border:1px solid var(--line);border-radius:7px;background:#fafbfd;padding:14px}
.employee-admin-form{display:grid;grid-template-columns:1fr 1.2fr .8fr .8fr .7fr auto auto;gap:10px;align-items:end}
.employee-delete-form{margin-top:10px}
.employee-hide-form{margin-top:8px}
.employee-admin-form label,.new-employee-form label{display:grid;gap:4px;color:var(--muted);font-size:12px;font-weight:600}
.employee-admin-form input,.new-employee-form input{width:100%;box-sizing:border-box}
.employee-schedule-fields{display:grid;gap:4px;min-width:250px}
.employee-field-label{color:var(--muted);font-size:12px;font-weight:600}
.employee-schedule-list{display:grid;gap:6px}
.employee-schedule-row{display:grid;grid-template-columns:1fr auto 1fr auto;gap:5px;align-items:center}
.employee-schedule-row input{min-width:0}
.add-schedule{justify-self:start;margin-top:2px}
.new-employee-form{display:grid;grid-template-columns:1fr 1.2fr .8fr .8fr .7fr auto;gap:12px;align-items:end}
.profile-time-input{font-variant-numeric:tabular-nums}
@media (max-width:800px){.profile-admin-form{grid-template-columns:1fr}.profile-admin-form label:first-child{grid-column:auto}.profile-employee-schedule{grid-template-columns:1fr 110px;gap:8px 14px}.profile-employee-schedule>span{grid-column:1 / -1}.profile-employee-schedule>label{max-width:none}.profile-schedule-list{grid-column:1 / -1}.add-profile-schedule{grid-column:2;grid-row:3;justify-self:end}.profile-save{grid-column:auto}.save-success{justify-self:start}}
@media (max-width:800px){.user-admin-card{display:grid}.user-admin-form{grid-template-columns:1fr 1fr}.user-delete{justify-self:start}.new-user-form,.new-profile-form,.new-employee-form,.employee-admin-form{grid-template-columns:1fr 1fr}.employee-admin-form .employee-schedule-fields,.employee-admin-form .profile-save{grid-column:1 / -1}}
.admin-grid td{width:48px;height:55px;padding:0}
.admin-day-wrap{position:relative;height:100%}
.admin-day a{display:flex;flex-direction:column;justify-content:center;height:100%;color:var(--text)}
.admin-day a:hover{background:#eef4ff}
.admin-day small{font-size:10px;line-height:1.1;margin-top:2px;color:var(--muted)}
.admin-intervals{line-height:1}
.admin-interval-pair{display:block;position:relative;line-height:1}
.admin-interval-pair.multiple{padding-left:3px}
.admin-interval-pair.multiple::before{content:"";position:absolute;left:3px;top:50%;width:2px;height:10px;box-sizing:border-box;transform:translateY(-50%);border:1px solid #6b7280;border-right:0}
.delete-entry-form{position:absolute;top:1px;right:1px;z-index:2}
.delete-entry-button{width:14px;height:14px;padding:0;border:0;background:transparent;color:#a52a2a;font-size:14px;line-height:14px;font-weight:700;cursor:pointer}
.delete-entry-button:hover{color:#6f1717;background:#ffe5e5;border-radius:3px}
.entry-wrap{max-width:760px;margin:0 auto}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.interval-row{display:flex;align-items:center;gap:8px;margin:8px 0}
.interval-row input{width:150px}
.interval-row .time-input{font-variant-numeric:tabular-nums;letter-spacing:.04em}
.calculated-hours{display:block;margin-top:4px;color:var(--muted);font-size:11px;font-weight:500}
.scope-options{display:grid;gap:8px;margin-top:18px;padding:12px;background:#f6f8fb;border:1px solid var(--line);border-radius:8px}
.checkbox-label{display:flex;flex-direction:row;align-items:center;gap:8px;font-weight:600}
.checkbox-label input{width:16px;height:16px;margin:0}
.block-label{margin-top:18px}
.actions{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px;margin-top:18px}
.back-button{grid-column:1;grid-row:1;justify-self:start}
.save-button{grid-column:2;grid-row:1;display:inline-flex!important;visibility:visible!important;justify-self:end;min-width:110px}
.simple-table th,.simple-table td{padding:8px 10px;text-align:left;font-size:12px;white-space:nowrap}
.simple-table td:nth-child(5){white-space:normal;min-width:260px}

@media (max-width:760px){
    .topbar{height:auto;min-height:56px;padding:12px 14px;align-items:stretch;flex-direction:column;gap:10px}
    .topbar>div{width:100%}
    .topbar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;width:100%}
    .topbar nav a{text-align:center;padding:7px 4px;border:1px solid rgba(255,255,255,.16);border-radius:5px;font-size:12px}
    .company-switcher{grid-column:1 / -1;justify-content:space-between;margin:0;padding-bottom:2px}
    .company-switcher select{min-width:0;flex:1}
    .topbar a{margin-left:0}
    .container{padding:12px}
    .card{padding:14px}
    h1{font-size:20px}
    .page-head{align-items:flex-start;flex-direction:column;gap:8px}
    .controls{grid-template-columns:1fr;align-items:stretch}
    .inline-form{width:100%}
    .controls > .inline-form:first-child{display:flex}
    .inline-form label{flex:1;min-width:100px}
    .inline-form input,.inline-form select{width:100%}
    .profile-info{width:100%}
    .employee-col{min-width:130px!important;max-width:130px}
    .pontaj-table td{min-width:44px}
    .form-grid{grid-template-columns:1fr}
    .interval-row{flex-wrap:wrap}
    .interval-row input{flex:1;min-width:120px}
    .report-heading{margin-top:14px}
    .report-heading h2{font-size:16px;white-space:normal}
    .superadmin-company-table{min-width:1180px}
}

@media (max-width:480px){
    .topbar{padding:10px}
    .brand{font-size:17px}
    .muted-light{font-size:12px}
    .container{padding:8px}
    .card{padding:12px;border-radius:7px}
    h1{font-size:19px}
    h2{font-size:17px}
    .inline-form,.controls > .inline-form:first-child{display:grid;grid-template-columns:1fr;gap:10px}
    .inline-form label{min-width:0;width:100%}
    .inline-form .btn{width:100%}
    .profile-section-heading,.admin-months-heading{align-items:flex-start;flex-direction:column;gap:8px}
    .profile-admin-card{padding:14px}
    .user-admin-card{display:grid;padding:12px}
    .user-admin-form,.new-user-form,.new-profile-form,.new-employee-form,.employee-admin-form{grid-template-columns:1fr}
    .employee-admin-form .employee-schedule-fields,.employee-admin-form .profile-save{grid-column:auto}
    .employee-schedule-fields{min-width:0}
    .employee-schedule-row{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
    .employee-schedule-row .btn{grid-column:1 / -1;justify-self:start}
    .profile-employee-schedule{grid-template-columns:1fr;gap:8px}
    .profile-employee-schedule>span,.profile-employee-schedule>label,.profile-schedule-list{grid-column:auto}
    .profile-employee-schedule>label{max-width:none}
    .add-profile-schedule{grid-column:auto;grid-row:auto;justify-self:start}
    .actions{grid-template-columns:1fr}
    .back-button,.save-button{grid-column:auto;grid-row:auto;justify-self:stretch;width:100%}
}

.future-value{
    color:#b8bec8 !important;
    font-weight:500 !important;
}
.start-time{
    color:#111827;
    font-weight:400;
}

.pontaj-title{
    text-align:center;
    font-size:20px;
    font-weight:700;
    line-height:1.35;
    margin:4px auto 18px;
    max-width:1100px;
}

.pontaj-main-title{
    text-align:center;
    font-size:20px;
    font-weight:600;
    line-height:1.35;
    margin:4px auto 20px;
    max-width:1100px;
    color:#1b2430;
}
