:root{
  --bg:#f3f6fb;
  --panel:#ffffff;
  --panel2:#f8fbff;
  --border:#d8e1eb;
  --border2:#c8d4e1;
  --text:#1f2937;
  --muted:#55627a;
  --muted2:#7b879c;
  --accent:#198754;
  --accent-strong:#136c42;
  --shadow: 0 10px 26px rgba(15, 23, 42, .10);
  --radius:18px;
  --radius2:14px;
}

*{box-sizing:border-box}
html,body{
  height:100%;
  width:100%;
}
body{
  margin:0;
  min-height:100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color:var(--text);
  background:
    radial-gradient(980px 460px at 18% 10%, rgba(25,135,84,.10), transparent 60%),
    radial-gradient(800px 420px at 84% 16%, rgba(54,120,88,.09), transparent 58%),
    linear-gradient(180deg, #f8fafc, #eef3f8);
  overflow:hidden;
}

a{color:inherit; text-decoration:none}
.role-user [id$="-toggle"],
.role-user [id$="-submit"],
.role-user [data-action="edit"],
.role-user [data-action="delete"]{display:none!important}
.role-user #booking-toggle,
.role-user #booking-submit{
  display:inline-flex!important;
}
.role-user #booking-request-submit{
  display:inline-flex!important;
}
.role-user [data-action="edit"],
.role-user [data-action="delete"]{display:none!important}
.container{
  width:100vw;
  height:100vh;
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:0;
  padding:0;
  min-height:0;
}

.sidebar{
  background: linear-gradient(180deg, #16824f, #137646);
  border:1px solid rgba(7, 64, 37, .38);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding:18px;
  display:flex;
  flex-direction:column;
  min-width:240px;
  min-height:0;
  overflow:auto;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:8px 8px 18px;
  border-bottom:1px solid rgba(255,255,255,.22);
  margin-bottom:14px;
}
.brand .logo{
  width:34px;height:34px;border-radius:12px;
  background: url("../img/setec.png") center/125% no-repeat;
  box-shadow:none;
  border:0;
}
.brand .title{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.brand .title b{font-size:14px; letter-spacing:.2px}
.brand .title span{font-size:12px; color:rgba(236, 253, 245, .88)}

.nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-top:6px;
}
.nav a{
  padding:12px 12px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#f0fdf4;
  border:1px solid transparent;
}
.navLabel{
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:0;
  font-weight:600;
}
.navIcon{
  font-size:16px;
  line-height:1;
  opacity:.95;
}
.nav a small{color:rgba(220, 252, 231, .88); font-weight:600}
.nav a:hover{background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22)}
.nav a.active{
  background: rgba(255,255,255,.24);
  border-color: rgba(255,255,255,.42);
  box-shadow: 0 8px 18px rgba(7, 64, 37, .24) inset;
}

.sideFooter{
  margin-top:auto;
  padding-top:14px;
  border-top:1px solid rgba(255,255,255,.22);
  color:rgba(236, 253, 245, .80);
  font-size:12px;
  display:flex;
  justify-content:space-between;
  gap:10px;
}
.sideSignOut{
  margin-top:auto;
  padding:12px 0;
  border-top:1px solid rgba(255,255,255,.22);
  border-bottom:1px solid rgba(255,255,255,.22);
}
.signOutBtn{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.34);
  background: rgba(255,255,255,.10);
  color:#f0fdf4;
  cursor:pointer;
  font-weight:700;
  font-size:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.signOutBtn .bi{
  font-size:14px;
  line-height:1;
}
.signOutBtn:hover{
  background: rgba(239,68,68,.16);
  border-color: rgba(248,113,113,.66);
}
.sideSignOut + .sideFooter{
  margin-top:12px;
  padding-top:0;
  border-top:0;
}

.main{
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.96));
  border:1px solid var(--border);
  border-radius: 0;
  box-shadow: var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:0;
}

.topbar{
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  border-bottom:1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}
.headerText h1{
  margin:0;
  font-size:20px;
  letter-spacing:.2px;
}
.headerText p{
  margin:6px 0 0;
  font-size:12px;
  color:var(--muted);
}

.topRight{
  display:flex;
  align-items:center;
  gap:12px;
}

.search{
  display:flex;
  align-items:center;
  gap:10px;
  background: #ffffff;
  border:1px solid var(--border2);
  border-radius: 12px;
  padding:10px 12px;
  min-width: 320px;
  position:relative;
}
.search input{
  background: transparent;
  border:0;
  outline:0;
  color:var(--text);
  width:100%;
  font-size:13px;
}
.search .icon{
  width:18px;height:18px; opacity:.9;
}
.globalSearchMenu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 8px);
  z-index:35;
  display:none;
  max-height:300px;
  overflow:auto;
  padding:6px;
  border:1px solid var(--border2);
  border-radius:12px;
  background:#ffffff;
  box-shadow: var(--shadow);
}
.globalSearchMenu.open{
  display:block;
}
.globalSearchItem{
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  border-radius:8px;
  padding:8px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
}
.globalSearchItem:hover,
.globalSearchItem.active{
  background:#edf7f0;
}
.globalSearchLeft{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.globalSearchTitle{
  font-size:13px;
  font-weight:700;
  color:var(--text);
}
.globalSearchMeta{
  font-size:11px;
  color:var(--muted2);
}
.globalSearchCurrent{
  border:1px solid var(--border2);
  border-radius:999px;
  padding:3px 8px;
  font-size:10px;
  font-weight:700;
  color:var(--muted);
  background:#f7fafc;
}
.globalSearchEmpty{
  padding:8px 10px;
  font-size:12px;
  color:var(--muted2);
}

.userCard{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius: 14px;
  border:1px solid var(--border);
  background: #f8fbff;
}
.userCard .avatar{
  width:34px;height:34px;min-width:34px;min-height:34px;
  border-radius:50%;
  background: url("../img/Laor Software Avata.png") center/cover no-repeat;
  border:0;
  overflow:hidden;
  flex:0 0 auto;
}
.userCard .avatar.hasProfile{
  background:none;
}
.userCard .avatar img{
  display:block;
  width:100%;
  height:100%;
  min-width:34px;
  min-height:34px;
  object-fit:cover;
  transform:scale(1.55);
}
.userCard b{font-size:13px}
.userCard span{display:block; margin-top:3px; font-size:12px; color:var(--muted2)}

.profileCell{width:72px; text-align:center; vertical-align:middle;}
.profileThumb,.profileFallback{
  display:inline-flex;
  width:36px;
  height:36px;
  min-width:36px;
  min-height:36px;
  border-radius:50%;
  align-items:center;
  justify-content:center;
  object-fit:cover;
  border:0;
  background:#eef5f1;
  color:var(--muted2);
  font-size:20px;
  vertical-align:middle;
}
.profileFallback[hidden]{display:none!important;}
.profileThumb{transform:scale(1.35);}
.profilePreview{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  color:var(--muted2);
  font-size:12px;
}
.profilePreview img{width:44px;height:44px;border-radius:50%;object-fit:cover;border:0;transform:scale(1.25);}

.content{
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:16px;
  flex:1;
  min-height:0;
  overflow:auto;
}

.cards{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:14px;
}

.card{
  position:relative;
  padding:16px;
  border-radius: 18px;
  border:1px solid var(--border);
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  overflow:hidden;
  min-height: 92px;
}
.card:before{
  content:"";
  position:absolute;
  width:160px; height:160px;
  right:-80px; top:-90px;
  background: radial-gradient(circle at 30% 30%, rgba(25,135,84,.22), rgba(25,135,84,0) 65%);
  pointer-events:none;
}
.cardIcon{
  position:absolute;
  right:12px;
  top:12px;
  width:34px;
  height:34px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(25,135,84,.32);
  background: rgba(25,135,84,.12);
  color:var(--accent-strong);
  z-index:1;
}
.cardIcon .bi{
  font-size:16px;
  line-height:1;
}
.card h3{margin:0; font-size:12px; color:var(--muted); font-weight:700}
.card .big{margin-top:10px; font-size:28px; font-weight:800; letter-spacing:.3px}
.card .sub{margin-top:4px; font-size:12px; color:var(--muted2)}

.panel{
  border:1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  overflow:hidden;
}
.listPanel{
  min-height:0;
  display:flex;
  flex-direction:column;
}
.modal{
  position:fixed;
  inset:0;
  background: rgba(15,23,42,.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:1000;
  backdrop-filter: blur(3px);
}
.modal.open{
  display:flex;
}
.modalCard{
  width:min(920px, 96vw);
  max-height:90vh;
  overflow:auto;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  border:1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.modalCardSmall{width:min(560px, 96vw);}
.requestSummary{
  margin:0 0 14px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#f8fbff;
  color:var(--muted);
  font-size:12px;
}
.field textarea{
  width:100%;
  resize:vertical;
  border:1px solid var(--border2);
  border-radius:10px;
  padding:10px;
  color:var(--text);
  font:inherit;
}
.modalHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
}
.modalBody{
  padding:14px 16px 18px;
}
.panelHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 14px;
  border-bottom:1px solid var(--border);
}
.panelHead b{font-size:14px}
.panelTools{
  margin-left:auto;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}
.dateRangeControl{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.dateRangeSelect,
.sortSelect,
.dateRangeInput{
  border:1px solid var(--border2);
  background:#ffffff;
  color:var(--text);
  border-radius:10px;
  height:32px;
  padding:0 10px;
  font-size:12px;
}
.dateRangeSelect{
  min-width:126px;
}
.sortSelect{
  min-width:104px;
}
.dateRangeCustom{
  display:none;
  align-items:center;
  gap:8px;
}
.dateRangeCustom.open{
  display:flex;
}
.dateRangeTo{
  font-size:11px;
  color:var(--muted2);
}
.panelHead .btn{
  padding:9px 12px;
  border-radius: 12px;
  border:1px solid rgba(25,135,84,.45);
  background: rgba(25,135,84,.10);
  color:var(--accent-strong);
  cursor:pointer;
  font-weight:700;
  font-size:12px;
}
.panelHead .btn:hover{background: rgba(25,135,84,.16)}
.btn{
  padding:9px 12px;
  border-radius: 12px;
  border:1px solid rgba(25,135,84,.45);
  background: rgba(25,135,84,.10);
  color:var(--accent-strong);
  cursor:pointer;
  font-weight:700;
  font-size:12px;
}
.btn:hover{background: rgba(25,135,84,.16)}
.btn.ghost{
  background: transparent;
  border-color: var(--border2);
  color:var(--text);
}
.btn.danger{
  border-color: rgba(239,68,68,.5);
  background: rgba(239,68,68,.12);
  color:#b91c1c;
}
.btn.small{
  padding:6px 10px;
  font-size:11px;
  border-radius: 10px;
}
.panelBody{
  padding: 14px;
}
.formGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
.field label{
  display:block;
  margin-bottom:6px;
  font-size:12px;
  color:var(--muted);
}
.field input,
.field select,
.field textarea{
  width:100%;
  border-radius:10px;
  padding:10px 12px;
  background: #ffffff;
  border:1px solid var(--border2);
  color:var(--text);
  font-size:13px;
  outline:none;
}
.field select[multiple]{
  min-height: 92px;
  padding:8px 12px;
}
.field select option{
  background: #ffffff;
  color: var(--text);
}
.visuallyHidden{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}
.multiSelect{
  position:relative;
}
.multiSelectTrigger{
  width:100%;
  text-align:left;
  border-radius:10px;
  padding:10px 36px 10px 12px;
  background: #ffffff;
  border:1px solid var(--border2);
  color:var(--text);
  font-size:13px;
  cursor:pointer;
  position:relative;
}
.multiSelectTrigger::after{
  content:"";
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  border-width:5px 4px 0 4px;
  border-style:solid;
  border-color:var(--muted2) transparent transparent transparent;
  opacity:.9;
}
.multiSelect.open .multiSelectTrigger{
  border-color: rgba(25,135,84,.45);
  box-shadow: 0 0 0 2px rgba(25,135,84,.14);
}
.multiSelectMenu{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 6px);
  z-index:20;
  display:none;
  max-height:220px;
  overflow:auto;
  background:#ffffff;
  border:1px solid var(--border2);
  border-radius:12px;
  padding:6px;
  box-shadow: var(--shadow);
}
.multiSelect.open .multiSelectMenu{
  display:block;
}
.multiSelectOption{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:8px;
  cursor:pointer;
  font-size:13px;
  color:var(--text);
}
.multiSelectOption:hover{
  background: #f2f7f4;
}
.multiSelectOption input{
  margin:0;
  accent-color: var(--accent);
}
.multiSelectEmpty{
  padding:8px 10px;
  font-size:12px;
  color:var(--muted2);
}
.field textarea{
  min-height:70px;
  resize:vertical;
}
.field input[disabled]{
  opacity:.7;
  cursor:not-allowed;
}
.formActions{
  grid-column: 1 / -1;
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:4px;
}
.formHint{
  grid-column: 1 / -1;
  font-size:12px;
  color:var(--muted2);
}
.formHint.error{
  color:#fca5a5;
}
.actions{
  display:flex;
  gap:8px;
  align-items:center;
}
.actions .btn[data-action]{
  width:30px;
  height:28px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.actions .btn[data-action] .bi{
  font-size:13px;
  line-height:1;
}
.actions .btn[data-action^="request-"]{
  width:auto;
  height:auto;
  min-width:max-content;
  padding:6px 10px;
  white-space:nowrap;
}
.actions:has(.btn[data-action^="request-"]){
  flex-wrap:wrap;
  min-width:190px;
}
.empty{
  text-align:center;
  color:var(--muted2);
  padding:16px;
}

.tableWrap{
  overflow:auto;
  overflow-x:auto;
  overflow-y:auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  max-height:min(46vh, 420px);
}
.listPanel .tableWrap{
  flex:0 0 auto;
  height: clamp(220px, 52vh, 620px);
  min-height: clamp(220px, 52vh, 620px);
  max-height: clamp(220px, 52vh, 620px);
}
table{
  width:100%;
  border-collapse:collapse;
  min-width: 780px;
}
thead th{
  text-align:left;
  font-size:12px;
  color: var(--muted);
  font-weight:700;
  letter-spacing:.2px;
  padding:12px 14px;
  background: #f6f9fc;
  position: sticky;
  top: 0;
  z-index: 2;
}
tbody td{
  padding:12px 14px;
  border-top:1px solid #e5edf5;
  font-size:13px;
  color: var(--text);
}
tbody tr:hover{background: #f7fafc}

.pill{
  display:inline-flex;
  align-items:center;
  border-radius: 999px;
  padding:6px 10px;
  font-size:12px;
  font-weight:700;
  border:1px solid var(--border2);
  background: #f8fbff;
}
.pill.ok{border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10)}
.pill.warn{border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.12)}
.pill.bad{border-color: rgba(239,68,68,.45); background: rgba(239,68,68,.12)}

@media (max-width: 1100px){
  .container{grid-template-columns: 1fr}
  .sidebar{display:none}
  .cards{grid-template-columns: repeat(2, 1fr)}
  .search{min-width: 220px}
}
@media (max-width: 620px){
  .topbar{flex-direction:column; align-items:flex-start}
  .topRight{width:100%}
  .search{min-width: 0; flex:1}
  .cards{grid-template-columns: 1fr}
  .formGrid{grid-template-columns: 1fr}
  table{min-width: 620px}
  .panelHead{
    align-items:flex-start;
  }
  .panelTools{
    width:100%;
    justify-content:flex-start;
  }
}

/* All pages: make main table panels fill available height */
body[data-page] .content > .listPanel{
  flex:1;
  min-height:0;
}
body[data-page] .content > .listPanel .tableWrap{
  flex:1;
  height:auto;
  min-height:0;
  max-height:none;
}
