html, body {max-width:100%; overflow-x:hidden;}
#bakvakt-app, #bakvakt-app * {box-sizing:border-box;}
:root {
  --bv-primary: #14532d;
  --bv-secondary: #0f172a;
  --bv-bg: #f8fafc;
  --bv-card: #ffffff;
  --bv-border: #e2e8f0;
  --bv-text: #0f172a;
  --bv-muted: #475569;
  --bv-radius: 18px;
  --bv-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
}
#bakvakt-app {font-family: Inter, system-ui, sans-serif; color: var(--bv-text); background: linear-gradient(180deg, #f8fafc 0%, #eef5f1 100%); min-height: 100vh; width:100%; max-width:100%; overflow-x:hidden; box-sizing:border-box;}
.bv-wrap {max-width: 1440px; margin: 0 auto; padding: 16px; width:100%; box-sizing:border-box;}
.bv-header {position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: rgba(255,255,255,.88); border-bottom: 1px solid rgba(226,232,240,.8);}
.bv-header-inner {display:flex; align-items:center; justify-content:space-between; gap:12px; padding: 12px 16px; max-width:1440px; margin:0 auto;}
.bv-brand {display:flex; align-items:center; gap:12px; font-weight:800; font-size: 1.1rem;}
.bv-logo {width:40px; height:40px; border-radius: 14px; background: linear-gradient(135deg,var(--bv-primary),#22c55e); color:#fff; display:grid; place-items:center; font-weight:900; box-shadow: var(--bv-shadow);}
.bv-user {font-weight:700; color:#111827;}
.bv-nav {display:flex; gap:8px; flex-wrap:wrap;}
.bv-nav button, .bv-btn {border:0; background:#fff; color:var(--bv-secondary); padding:10px 14px; border-radius:14px; box-shadow:0 2px 8px rgba(15,23,42,.06); font-weight:700; cursor:pointer;}
.bv-nav button.active, .bv-btn-primary {background:var(--bv-primary); color:#fff;}
.bv-grid {display:grid; gap:16px;}
.bv-stats {grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); margin:16px 0;}
.bv-card {background:var(--bv-card); border:1px solid var(--bv-border); border-radius:var(--bv-radius); box-shadow: var(--bv-shadow); padding:18px;}
.bv-stat-number {font-size:2rem; font-weight:900; margin-top:6px;}
.bv-title {font-size:1.2rem; font-weight:900; margin:0 0 14px;}
.bv-list {display:grid; gap:12px;}
.bv-shift {display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px; border:1px solid var(--bv-border); border-radius:16px; background:linear-gradient(180deg,#fff,#f8fafc);}
.bv-shift-main {display:grid; gap:4px;}
.bv-badge {display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; font-size:.85rem; font-weight:800;}
.bv-stadfest {background:#dcfce7; color:#166534;}
.bv-afleysing_oskað {background:#fef3c7; color:#92400e;}
.bv-afleysing_tekin {background:#dbeafe; color:#1d4ed8;}
.bv-danger {background:#fee2e2; color:#991b1b;}
.bv-two {grid-template-columns: 1.2fr .8fr;}
.bv-form {display:grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap:12px;}
.bv-field {display:grid; gap:6px;}
.bv-field label {font-size:.9rem; color:var(--bv-muted); font-weight:700;}
.bv-field input, .bv-field select, .bv-field textarea {width:100%; border:1px solid #dbe0e8; background:#fff; border-radius:14px; padding:12px 14px; color:#111827;}
.bv-field textarea {min-height:90px; resize:vertical;}
.bv-table-wrap {overflow:auto;}
.bv-table {width:100%; border-collapse:collapse;}
.bv-table th, .bv-table td {padding:12px 10px; border-bottom:1px solid #edf2f7; text-align:left;}
.bv-table th {font-size:.85rem; color:var(--bv-muted); text-transform:uppercase; letter-spacing:.04em;}
.bv-login {display:grid; place-items:center; min-height:100vh; padding:24px;}
.bv-login-card {width:min(100%,420px); background:#fff; border-radius:26px; box-shadow: var(--bv-shadow); padding:28px; border:1px solid var(--bv-border);}
.bv-login-title {font-size:1.7rem; font-weight:900; margin:12px 0 6px;}
.bv-muted {color:var(--bv-muted);}
.bv-actions {display:flex; gap:8px; flex-wrap:wrap;}
.bv-small {font-size:.88rem;}
.bv-month-toolbar {display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:18px; flex-wrap:wrap;}
.bv-month-label {font-size:2rem; line-height:1.1; font-weight:900; color:var(--bv-text); text-transform:capitalize;}
.bv-calendar-wrap {display:grid; gap:0; overflow-x:auto; padding-bottom:4px;}
.bv-weekdays, .bv-calendar {min-width:980px;}
.bv-weekdays {display:grid; grid-template-columns: repeat(7, minmax(140px,1fr)); gap:0; border:1px solid #cbd5e1; border-bottom:0; background:#fff;}
.bv-weekday {padding:12px 8px; text-align:center; font-size:1rem; font-weight:500; color:#111827; border-right:1px solid #cbd5e1;}
.bv-weekday:last-child {border-right:0;}
.bv-calendar {display:grid; grid-template-columns: repeat(7, minmax(140px,1fr)); gap:0; border-left:1px solid #cbd5e1; border-top:1px solid #cbd5e1; background:#fff;}
.bv-day {appearance:none; text-align:left; background:#fff; border:0; border-right:1px solid #cbd5e1; border-bottom:1px solid #cbd5e1; border-radius:0; min-height:150px; padding:10px 10px 8px; display:grid; grid-template-rows:auto 1fr; gap:8px; cursor:pointer; box-shadow:none; transition:background .18s ease;}
.bv-day:hover {background:#f8fafc;}
.bv-day.is-outside {background:#f8fafc; color:#94a3b8;}
.bv-day.has-items {background:#fcfffd;}
.bv-day-head {font-weight:700; font-size:1rem; line-height:1; color:#111827;}
.bv-day.is-outside .bv-day-head {color:#94a3b8;}
.bv-day-items {display:grid; gap:6px; align-content:start;}
.bv-chip {width:100%; text-align:left; border:0; border-radius:8px; padding:5px 7px; font-size:.72rem; font-weight:700; background:#dcfce7; color:#166534; line-height:1.25; cursor:pointer;}
.bv-chip.bv-chip-afleysing_oskað {background:#fef3c7; color:#92400e;}
.bv-chip.bv-chip-afleysing_tekin {background:#dbeafe; color:#1d4ed8;}
.bv-more-chip {width:max-content; border:0; background:transparent; padding:0; font-size:.72rem; font-weight:800; color:var(--bv-primary); cursor:pointer;}
.bv-modal-overlay {position:fixed; inset:0; background:rgba(15,23,42,.45); display:grid; place-items:center; padding:18px; z-index:9999;}
.bv-modal-card {width:min(100%,640px); max-height:min(85vh,720px); overflow:auto; background:#fff; border-radius:22px; padding:18px; box-shadow:0 20px 60px rgba(15,23,42,.28);}
.bv-modal-head {display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px;}
.bv-modal-title {margin:0; font-size:1.2rem; font-weight:900;}
.bv-footer-nav {position:sticky; bottom:0; background:rgba(255,255,255,.94); backdrop-filter:blur(12px); border-top:1px solid #e2e8f0; padding:10px 12px; display:none; z-index:30;}
.bv-footer-nav .bv-nav {display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; width:100%;}
.bv-footer-nav button {width:100%;}
.bv-empty {padding:22px; text-align:center; color:var(--bv-muted); border:1px dashed var(--bv-border); border-radius:18px;}

.bv-weekday-short{display:none;}
.bv-chip{overflow:hidden; white-space:nowrap; text-overflow:ellipsis;}
.bv-day-today .bv-day-head{display:inline-grid; place-items:center; width:28px; height:28px; border-radius:999px; background:var(--bv-primary); color:#fff;}
.bv-day.is-outside .bv-chip{opacity:.75;}

@media (max-width: 900px) {
  .bv-two {grid-template-columns:1fr;}
  .bv-header-inner{align-items:flex-start;flex-direction:column}
  .bv-nav{width:100%}
  .bv-nav button{flex:1}
  .bv-footer-nav{display:none;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  .bv-wrap{padding:12px;padding-bottom:92px;}
  .bv-card{padding:14px;border-radius:16px;}
  .bv-month-label{font-size:1.45rem;}
  .bv-weekdays, .bv-calendar {min-width:100%;}
  .bv-weekdays {grid-template-columns: repeat(7, 1fr);}
  .bv-calendar {grid-template-columns: repeat(7, 1fr);}
  .bv-day{min-height:100px;}
}
@media (max-width: 640px) {
  .bv-shift{flex-direction:column;align-items:flex-start}
  .bv-login-card{padding:22px}
  .bv-header-inner{padding:10px 12px;}
  .bv-brand{font-size:1rem;}
  .bv-logo{width:36px;height:36px;border-radius:12px;}
  .bv-nav{display:flex;}
  .bv-footer-nav .bv-nav{display:none;}
  .bv-month-toolbar{gap:10px;align-items:stretch;}
  .bv-month-toolbar > div:last-child{width:100%;display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;}
  .bv-month-toolbar > div:last-child .bv-btn{padding:10px 8px;font-size:.95rem;}
  .bv-month-label{font-size:1.25rem;}
  .bv-weekdays, .bv-calendar {min-width:100%;}
  .bv-calendar-wrap{overflow:hidden;}
  .bv-weekday{font-size:.74rem; padding:8px 2px; font-weight:700;}
  .bv-weekday-full{display:none;}
  .bv-weekday-short{display:inline;}
  .bv-day{min-height:78px; padding:4px 4px 3px; gap:4px; border-right:1px solid #cbd5e1; border-bottom:1px solid #cbd5e1;}
  .bv-day-head{font-size:.8rem; font-weight:800;}
  .bv-day-today .bv-day-head{width:22px;height:22px;font-size:.72rem;}
  .bv-day-items{gap:2px;}
  .bv-chip{font-size:.52rem; padding:2px 4px; border-radius:5px; line-height:1.15;}
  .bv-more-chip{font-size:.58rem;}
  .bv-card > .bv-title{font-size:1.05rem;}
}

.bv-users-layout{align-items:start;}
.bv-users-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px;}
.bv-users-mobile{display:none;gap:12px;}
.bv-user-card{border:1px solid var(--bv-border);border-radius:16px;padding:14px;background:linear-gradient(180deg,#fff,#f8fafc);display:grid;gap:12px;}
.bv-user-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;}
.bv-user-name{font-weight:900;font-size:1rem;}
.bv-user-meta{display:flex;flex-wrap:wrap;gap:8px;}
.bv-user-pill{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:#f1f5f9;font-size:.78rem;font-weight:700;color:#0f172a;}
.bv-user-inline{display:grid;grid-template-columns:1fr auto 1fr auto;gap:10px;align-items:end;}
.bv-inline-check{display:flex;gap:8px;align-items:center;font-weight:700;color:var(--bv-muted);}
.bv-inline-order{display:grid;gap:6px;min-width:84px;}
.bv-inline-order label{font-size:.85rem;color:var(--bv-muted);font-weight:700;}
.bv-inline-number{width:84px;border:1px solid #dbe0e8;background:#fff;border-radius:12px;padding:10px 12px;color:#111827;}

@media (max-width: 900px){
  .bv-users-layout{grid-template-columns:1fr;}
}
@media (max-width: 640px){
  .bv-users-desktop{display:none;}
  .bv-users-mobile{display:grid;}
  .bv-user-card-top{flex-direction:column;align-items:stretch;}
  .bv-user-inline{grid-template-columns:1fr;align-items:stretch;}
  .bv-inline-number{width:100%;}
}

.bv-more-menu{width:min(100%,420px);}
@media (max-width: 640px) {
  .bv-header{position:relative;}
  .bv-user{font-size:1.05rem;}
  .bv-wrap{padding:10px;padding-bottom:98px;}
  .bv-card{padding:12px;border-radius:14px;}
  .bv-title{font-size:1rem;}
  .bv-stat-number{font-size:1.7rem; line-height:1.05; overflow-wrap:anywhere;}
  .bv-shift-main strong, .bv-shift-main span{overflow-wrap:anywhere; word-break:break-word;}
  .bv-footer-nav{left:0; right:0; width:100%; box-sizing:border-box; padding:8px 10px calc(8px + env(safe-area-inset-bottom));}
  .bv-footer-nav button{padding:10px 6px; font-size:.86rem; border-radius:12px; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
  .bv-empty{padding:16px;}
  .bv-users-layout{display:grid; grid-template-columns:1fr;}
  .bv-users-mobile{display:grid;}
  .bv-user-card{padding:12px;}
  .bv-user-meta{gap:6px;}
  .bv-user-pill{font-size:.74rem; padding:5px 8px;}
}

.bv-logo-img{display:block;object-fit:cover;border-radius:18px;box-shadow:0 8px 22px rgba(15,23,42,.10)}
.bv-logo-md{width:56px;height:56px}
.bv-logo-lg{width:84px;height:84px;margin:0 auto 12px}
.bv-user-card-top .bv-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}


.bv-header {position: sticky; top: 0; z-index: 40; backdrop-filter: blur(14px); background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(226,232,240,.9);} 
.bv-header-inner {display:flex; flex-direction:column; align-items:stretch; gap:10px; padding:12px 16px; max-width:1600px; margin:0 auto;}
.bv-header-top {display:flex; align-items:center; justify-content:space-between; gap:12px;}
.bv-header-actions {display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end;}
.bv-user-line {font-size:1.05rem; font-weight:800; color:#111827;}
.bv-top-nav-wrap {overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:2px;}
.bv-top-nav {display:flex; gap:8px; flex-wrap:nowrap; min-width:max-content;}
.bv-top-nav button {border:0; background:#fff; color:var(--bv-secondary); padding:10px 14px; border-radius:14px; box-shadow:0 2px 8px rgba(15,23,42,.06); font-weight:700; cursor:pointer; white-space:nowrap;}
.bv-top-nav button.active {background:var(--bv-primary); color:#fff;}
.bv-install-btn {white-space:nowrap;}
.bv-footer-nav {display:none !important;}
.bv-logo-img {display:block; object-fit:cover; border-radius:14px; box-shadow: var(--bv-shadow);} 
.bv-logo-md {width:40px; height:40px;}
.bv-logo-lg {width:72px; height:72px; border-radius:20px; margin-bottom:6px;}

@media (max-width: 900px) {
  .bv-header-inner{padding:10px 12px;}
  .bv-wrap{padding:12px; padding-bottom:20px;}
}
@media (max-width: 640px) {
  .bv-header-top {align-items:flex-start;}
  .bv-header-actions {width:auto;}
  .bv-header-actions .bv-btn {padding:9px 10px; font-size:.9rem;}
  .bv-user-line {font-size:1.35rem;}
  .bv-top-nav button {padding:10px 12px; font-size:.95rem;}
}


/* v1.0.10 login/web-app fixes */
#bakvakt-app.bv-login-shell{position:fixed; inset:0; z-index:999999; overflow:auto; background:linear-gradient(180deg,#eef2f7 0%, #f8fafc 100%);}
#bakvakt-app.bv-app-shell{position:relative; z-index:10;}
.bv-login{min-height:100dvh; padding:24px; box-sizing:border-box; align-items:start;}
.bv-login-card{margin:20px auto 32px; width:min(100%,520px); border-radius:28px;}
.bv-login .bv-logo-lg{width:96px;height:96px;border-radius:24px;margin:0 auto 18px;}
.bv-login .bv-btn-primary{background:#d91c3c;}
.bv-install-btn{display:none;}
@media (max-width:640px){.bv-login{padding:18px 14px;}.bv-login-card{margin:14px auto 24px;padding:22px 18px 20px;}.bv-login-title{font-size:1.6rem;}}


/* v1.0.16 professional compact users layout */
.bv-users-layout{grid-template-columns:320px minmax(0,1fr);gap:14px;}
.bv-users-form-card,.bv-users-list-card{padding:16px;}
.bv-users-form-card .bv-title,.bv-users-list-card .bv-title{font-size:1rem;margin-bottom:8px;}
.bv-users-form-card .bv-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
.bv-users-form-card .bv-field{gap:4px;}
.bv-users-form-card .bv-field label{font-size:.82rem;}
.bv-users-form-card .bv-field input,.bv-users-form-card .bv-field select{padding:9px 10px;border-radius:10px;font-size:.92rem;}
.bv-users-form-card .bv-actions .bv-btn{padding:9px 12px;font-size:.9rem;}
.bv-users-list{display:grid;grid-template-columns:1fr;gap:10px;}
.bv-user-row{display:grid;grid-template-columns:minmax(220px,1.6fr) minmax(260px,1.2fr) auto;gap:12px;align-items:center;padding:12px 14px;border-radius:14px;}
.bv-user-row-main{display:grid;gap:4px;min-width:0;}
.bv-user-name{font-size:1rem;line-height:1.15;}
.bv-user-row .bv-small{font-size:.84rem;}
.bv-user-meta{gap:6px;}
.bv-user-pill{padding:4px 8px;font-size:.72rem;}
.bv-user-row-controls{display:grid;grid-template-columns:auto 84px auto;gap:10px;align-items:center;justify-content:start;}
.bv-inline-check{font-size:.86rem;color:#334155;white-space:nowrap;}
.bv-inline-check input{width:16px;height:16px;}
.bv-inline-order{gap:3px;min-width:auto;}
.bv-inline-order label{font-size:.76rem;}
.bv-inline-number{width:84px;padding:8px 10px;border-radius:10px;font-size:.9rem;}
.bv-user-row-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;}
.bv-user-row-actions .bv-btn{padding:8px 10px;border-radius:10px;font-size:.82rem;}
.bv-user-row-actions .bv-btn-primary{padding:8px 12px;}
.bv-users-head{margin-bottom:10px;}
.bv-users-head .bv-small{font-size:.82rem;}
.bv-users-desktop,.bv-users-mobile{display:none !important;}
@media (max-width:1100px){
  .bv-users-layout{grid-template-columns:290px minmax(0,1fr);} 
  .bv-user-row{grid-template-columns:minmax(180px,1.5fr) minmax(240px,1.1fr) auto;}
}
@media (max-width:900px){
  .bv-users-layout{grid-template-columns:1fr;}
  .bv-users-form-card .bv-form{grid-template-columns:1fr 1fr;}
  .bv-user-row{grid-template-columns:1fr;align-items:start;}
  .bv-user-row-controls{grid-template-columns:repeat(3,max-content);}
  .bv-user-row-actions{justify-content:flex-start;}
}
@media (max-width:640px){
  .bv-users-form-card,.bv-users-list-card{padding:12px;}
  .bv-users-form-card .bv-form{grid-template-columns:1fr;gap:8px;}
  .bv-user-row{padding:10px;gap:10px;}
  .bv-user-name{font-size:.95rem;}
  .bv-user-row-controls{grid-template-columns:1fr;gap:8px;}
  .bv-inline-order,.bv-inline-number{width:100%;}
  .bv-user-row-actions .bv-btn{flex:1;justify-content:center;text-align:center;}
}

.bv-checkgrid{display:flex;gap:12px;flex-wrap:wrap}.bv-inline-check{display:flex;align-items:center;gap:8px;font-weight:700}.bv-inline-check input{width:auto}.bv-actions .bv-btn{white-space:nowrap}

.bv-inline-select{min-width:180px;max-width:100%;padding:10px 12px;border:1px solid #d7dee7;border-radius:14px;background:#fff;}


/* v1.0.40 version badges */
.bv-header-version{font-size:.78rem;font-weight:800;color:#64748b;margin-top:2px;}
.bv-login-title-wrap{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 6px;}
.bv-login-version{display:inline-flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:999px;background:#f1f5f9;color:#334155;font-size:.78rem;font-weight:800;white-space:nowrap;}
@media (max-width:640px){.bv-login-title-wrap{align-items:flex-start;flex-direction:column;gap:6px;}.bv-login-version{font-size:.74rem;padding:5px 9px;}}

html, body {overflow-x:hidden; max-width:100%;}
#bakvakt-app, .bv-wrap, .bv-card, .bv-login-card, .bv-modal-card, .bv-shift, .bv-users-layout, .bv-user-row {min-width:0; box-sizing:border-box;}
.bv-modal-overlay {padding:10px;}
.bv-modal-card {width:min(calc(100vw - 20px), 640px); max-width:100%;}
.bv-shift-main, .bv-card, .bv-title, .bv-user-name, .bv-login-title {overflow-wrap:anywhere; word-break:break-word;}
.bv-top-nav-wrap {scrollbar-width:none;}
.bv-top-nav-wrap::-webkit-scrollbar {display:none;}
@media (max-width: 640px) {
  .bv-wrap {padding:8px !important;}
  .bv-header-inner {padding:8px 10px !important;}
  .bv-card {padding:10px !important;}
  .bv-modal-card {padding:12px !important; border-radius:18px;}
  .bv-modal-title {font-size:1rem; line-height:1.25;}
  .bv-month-label {font-size:1.15rem !important;}
  .bv-shift {padding:10px !important;}
  .bv-badge {font-size:.78rem;}
  .bv-top-nav button {padding:9px 10px; font-size:.9rem;}
  .bv-login-card {width:calc(100vw - 24px); max-width:520px;}
}


/* v1.0.42 mobile fit fixes */
#bakvakt-app{max-width:100vw; overflow-x:hidden;}
.bv-wrap,.bv-card,.bv-login,.bv-login-card,.bv-modal-card,.bv-shift,.bv-user-card,.bv-user-row{max-width:100%;}
.bv-modal-overlay{padding:12px;}
.bv-modal-card{width:min(100%,640px);}
@media (max-width: 640px){
  html, body{overflow-x:hidden; width:100%;}
  #bakvakt-app{width:100vw; overflow-x:hidden;}
  .bv-wrap{width:100%; max-width:100%; padding:10px 10px 20px;}
  .bv-card{width:100%; max-width:100%; overflow:hidden;}
  .bv-login{padding:10px; min-height:100dvh;}
  .bv-login-card{width:100%; max-width:100%; margin:8px auto 16px; padding:18px 14px 16px;}
  .bv-modal-overlay{padding:8px; align-items:center;}
  .bv-modal-card{width:calc(100vw - 16px); max-width:calc(100vw - 16px); max-height:85dvh; border-radius:18px; padding:14px;}
  .bv-modal-head{gap:8px;}
  .bv-modal-title{font-size:1rem; line-height:1.2;}
  .bv-shift{width:100%; max-width:100%; overflow:hidden;}
  .bv-shift-main{width:100%; min-width:0;}
  .bv-shift-main strong,.bv-shift-main span{display:block; max-width:100%; overflow-wrap:anywhere; word-break:break-word;}
  .bv-actions{width:100%;}
  .bv-actions .bv-btn{max-width:100%;}
  .bv-top-nav-wrap{width:100%; overflow-x:auto; overflow-y:hidden;}
  .bv-top-nav{min-width:max-content; padding-bottom:2px;}
}


/* v1.0.45 mobile fit fixes */
html, body, #bakvakt-app { overflow-x: hidden !important; }
#bakvakt-app { width: 100% !important; max-width: 100% !important; }
.bv-wrap { width: 100% !important; max-width: 100% !important; }

@media (max-width: 768px) {
  .bv-wrap {
    padding: 8px !important;
    padding-bottom: 130px !important;
  }

  .bv-header,
  .bv-header-inner,
  .bv-header-top,
  .bv-header-bottom {
    width: 100% !important;
    max-width: 100% !important;
  }

  .bv-header-inner {
    padding: 10px 10px 8px !important;
    gap: 8px !important;
  }

  .bv-header-top {
    gap: 8px !important;
    align-items: center !important;
  }

  .bv-brand {
    gap: 8px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .bv-logo,
  .bv-logo-md {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    flex: 0 0 34px !important;
  }

  .bv-brand-text,
  .bv-brand-meta,
  .bv-user {
    min-width: 0 !important;
  }

  .bv-brand-title,
  .bv-brand-sub,
  .bv-user {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .bv-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 8px !important;
    width: 100% !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
  }
  .bv-nav::-webkit-scrollbar { display: none !important; }

  .bv-nav button,
  .bv-btn {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    padding: 10px 12px !important;
    font-size: 16px !important;
    border-radius: 12px !important;
  }

  .bv-stats {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .bv-card {
    padding: 12px !important;
    border-radius: 14px !important;
  }

  .bv-title {
    font-size: 1rem !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
  }

  .bv-stat-number {
    font-size: 1.8rem !important;
    line-height: 1.05 !important;
  }

  .bv-month-toolbar {
    gap: 8px !important;
  }

  .bv-month-label {
    font-size: 1.25rem !important;
    line-height: 1.1 !important;
  }

  .bv-month-toolbar > div:last-child {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .bv-month-toolbar > div:last-child .bv-btn {
    min-width: 0 !important;
    padding: 10px 6px !important;
    font-size: 15px !important;
  }

  .bv-weekday {
    font-size: .72rem !important;
    padding: 6px 1px !important;
  }

  .bv-day {
    min-height: 74px !important;
    padding: 4px 3px !important;
    gap: 3px !important;
  }

  .bv-day-head {
    font-size: .78rem !important;
  }

  .bv-chip {
    font-size: .5rem !important;
    padding: 2px 4px !important;
    border-radius: 5px !important;
  }

  .bv-shift,
  .bv-shift-main,
  .bv-shift-main strong,
  .bv-shift-main span,
  .bv-user-name,
  .bv-user-pill,
  .bv-inline-check {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }

  .bv-modal-overlay {
    padding: 8px !important;
  }

  .bv-modal-card {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: 82vh !important;
    padding: 12px !important;
    border-radius: 18px !important;
  }

  .bv-modal-head {
    gap: 8px !important;
  }

  .bv-modal-title {
    font-size: 1rem !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
  }

  .bv-field input,
  .bv-field select,
  .bv-field textarea,
  input,
  select,
  textarea,
  button {
    font-size: 16px !important;
  }

  .bv-users-layout,
  .bv-users-mobile {
    grid-template-columns: 1fr !important;
  }

  .bv-user-card {
    padding: 12px !important;
  }

  .bv-user-card-top {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .bv-user-card-top .bv-actions {
    justify-content: stretch !important;
  }

  .bv-user-card-top .bv-actions .bv-btn {
    width: 100% !important;
  }
}


/* v1.0.54 desktop calendar width + cleaner fit */
@media (min-width: 1024px){
  .bv-wrap{max-width:1600px !important;}
  .bv-header-inner{max-width:1600px !important;}
  .bv-calendar-wrap{overflow-x:visible !important;}
  .bv-weekdays, .bv-calendar{
    min-width:0 !important;
    width:100% !important;
  }
  .bv-weekdays{
    grid-template-columns:repeat(7, minmax(0,1fr)) !important;
  }
  .bv-calendar{
    grid-template-columns:repeat(7, minmax(0,1fr)) !important;
  }
  .bv-day{
    min-height:150px !important;
  }
}

/* stronger mobile fit retained */
@media (max-width: 768px){
  .bv-wrap{
    padding:10px !important;
    padding-bottom:140px !important;
  }
  .bv-card{padding:14px !important;}
  .bv-stat-number{font-size:1.7rem !important;}
  .bv-shift{padding:10px !important;}
  .bv-nav{overflow-x:auto !important; flex-wrap:nowrap !important;}
  .bv-nav .bv-btn, .bv-nav button{flex:0 0 auto !important;}
}


/* v1.0.54 desktop + news */
@media (min-width: 1024px){
  .bv-calendar-wrap{overflow-x:visible !important;}
  .bv-weekdays, .bv-calendar{min-width:0 !important; width:100% !important;}
  .bv-weekdays{grid-template-columns:repeat(7, minmax(0,1fr)) !important;}
  .bv-calendar{grid-template-columns:repeat(7, minmax(0,1fr)) !important;}
  .bv-day{min-height:150px !important;}
}
.bv-news-body{white-space:pre-wrap; line-height:1.5;}
.bv-news-head{display:flex; justify-content:space-between; gap:12px; align-items:flex-start;}

.bv-form .bv-field .bv-btn{max-width:100%;}

.bv-log-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;}
.bv-log-pre{background:#0f172a;color:#e2e8f0;padding:10px;border-radius:12px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:12px;}


/* v1.0.54 news/mobile fixes */
.bv-news-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;}
.bv-news-body{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;}
@media (max-width: 768px){
  .bv-news-head{flex-direction:column;}
}

.bv-field .bv-small{line-height:1.4;}

.bv-select{width:100%; border:1px solid #dbe0e8; background:#fff; border-radius:14px; padding:12px 14px; color:#111827;}

.bv-day{cursor:pointer;}
.bv-day:focus{outline:2px solid var(--bv-primary);outline-offset:-2px;}
.bv-empty-day-card{margin-top:8px;border:1px dashed var(--bv-border);text-align:center;}
.bv-manual-shift-card .bv-form{align-items:end;}
.bv-inline-select{min-width:220px;}


/* v1.0.68 calendar tap + manual shift reliability */
.bv-day{appearance:none;-webkit-appearance:none;touch-action:manipulation;position:relative;}
.bv-day .bv-chip,.bv-day .bv-more-chip{pointer-events:none;display:inline-flex;align-items:center;}
.bv-empty-day-card,.bv-manual-shift-card{margin-top:12px;}
.bv-manual-shift-card .bv-form{grid-template-columns:1fr;}
@media (min-width: 700px){
  .bv-manual-shift-card .bv-form{grid-template-columns:1.4fr 1fr auto;align-items:end;}
}


/* v1.0.69 restore v1.0.62 modal layout with admin manual assignment */
.bv-inline-shift-select{min-width:220px;max-width:100%;}
.bv-manual-shift-inline{margin-top:12px;display:flex;gap:12px;flex-wrap:wrap;}
.bv-modal-card .bv-empty{padding:24px;border:1px dashed var(--bv-border);border-radius:16px;text-align:center;color:var(--bv-muted);background:#fff;}
.bv-shift .bv-actions > select.bv-inline-shift-select{flex:1 1 220px;}
@media (max-width: 699px){
  .bv-manual-shift-inline{flex-direction:column;}
  .bv-manual-shift-inline .bv-btn,
  .bv-manual-shift-inline .bv-inline-shift-select,
  .bv-shift .bv-actions > .bv-inline-shift-select{width:100%;}
}
.bv-help{font-size:.82rem;color:var(--bv-muted);line-height:1.35;}

/* v2.0.0 install + notifications */
.bv-install-btn{display:inline-flex !important;align-items:center;justify-content:center;}
.bv-install-modal{width:min(100%,520px);padding:0;overflow:hidden}
.bv-install-banner{display:flex;align-items:center;gap:12px;padding:18px 18px 0}
.bv-install-modal .bv-list{padding:0 18px 18px}
.bv-notify-shell{display:grid;gap:16px}
.bv-notify-hero{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap;padding-bottom:8px;border-bottom:1px solid var(--bv-border)}
.bv-notify-stat{padding:10px 14px;border-radius:999px;background:#f1f5f9;font-weight:800;color:#0f172a}
.bv-notify-grid .bv-card{box-shadow:none;background:linear-gradient(180deg,#fff,#f8fafc)}
@media (max-width:640px){.bv-notify-hero{align-items:stretch}.bv-notify-stat{width:100%;text-align:center}}


.bv-busy-overlay{position:fixed;inset:0;background:rgba(15,23,42,.28);backdrop-filter:blur(2px);z-index:99998;display:flex;align-items:center;justify-content:center;padding:20px;pointer-events:none}
.bv-busy-card{min-width:220px;max-width:90vw;background:#fff;border:1px solid #e2e8f0;border-radius:18px;box-shadow:0 20px 60px rgba(15,23,42,.2);padding:18px 20px;display:flex;align-items:center;gap:12px;pointer-events:auto}
.bv-busy-spinner{width:20px;height:20px;border-radius:999px;border:3px solid #e2e8f0;border-top-color:var(--bv-primary);animation:bvspin .8s linear infinite;flex:0 0 auto}
.bv-busy-text{font-weight:800;color:#0f172a}
.bv-btn[disabled]{opacity:.65;cursor:not-allowed;pointer-events:none}
@keyframes bvspin{to{transform:rotate(360deg)}}

.bv-modal-closing{opacity:0;transition:opacity .14s ease;}
.bv-home-year-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.bv-year-count-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}
.bv-year-count-card{display:flex;align-items:flex-start;justify-content:flex-start;gap:14px;padding:14px 16px;border:1px solid var(--bv-border);border-radius:18px;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.04);min-width:0}
.bv-year-count-card.is-me{border-color:var(--bv-primary);box-shadow:0 10px 22px rgba(217,28,60,.10)}
.bv-year-count-top{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 auto}
.bv-year-count-rank{width:42px;height:42px;border-radius:999px;background:#f8fafc;border:1px solid var(--bv-border);display:flex;align-items:center;justify-content:center;font-weight:900;color:#0f172a;flex:0 0 auto}
.bv-year-count-main{min-width:0;flex:1 1 auto;display:flex;flex-direction:column;gap:2px}
.bv-year-count-main strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bv-year-count-meta{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:2px;flex:0 0 auto;min-width:70px;padding-top:2px}
.bv-year-count-label{font-size:.78rem;font-weight:700;color:var(--bv-muted);text-transform:uppercase;letter-spacing:.04em}
.bv-year-count-value{font-size:1.5rem;font-weight:900;color:#0f172a;line-height:1}
@media (min-width: 1100px){.bv-year-count-grid{grid-template-columns:repeat(4,minmax(0,1fr));}.bv-year-count-card{padding:16px 18px;}}
@media (max-width: 900px){.bv-year-count-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));}}
@media (max-width: 640px){.bv-year-count-grid{grid-template-columns:1fr}.bv-year-count-card{padding:12px 14px;align-items:flex-start;flex-direction:column}.bv-year-count-top{width:100%}.bv-year-count-meta{width:100%;align-items:flex-start;padding-left:54px}.bv-year-count-value{font-size:1.35rem}}

.bv-login-help-row{margin-top:12px;display:flex;justify-content:flex-start}
.bv-link-btn{background:none;border:none;padding:0;color:var(--bv-primary);font-weight:700;cursor:pointer;text-decoration:underline;text-underline-offset:2px}
.bv-link-btn:hover{opacity:.9}
