:root{
  --brand-primary:#1C9E53;
  --brand-secondary:#2D3036;
  --brand-tertiary:#F6F7F9;

  --bg: var(--brand-tertiary);
  --card:#fff;
  --text:#111;
  --muted:#666;
  --border:#e6e6e6;
  --danger:#c0392b;
  --shadow: 0 8px 22px rgba(0,0,0,.08);
  --radius: 16px;
  --sidebar: 280px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

a{color:inherit}
button{cursor:pointer}
input,select,textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
}

textarea{min-height:90px; resize: vertical}

.btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:0;
  border-radius: 12px;
  padding:10px 12px;
  font-weight:600;
  background: var(--brand-secondary);
  color:#fff;
}
.btn.primary{background: var(--brand-primary)}
.btn.ghost{
  background: transparent;
  border:1px solid var(--border);
  color: var(--brand-secondary);
}
.btn.danger{background: var(--danger)}
.btn:disabled{opacity:.6; cursor:not-allowed}

.badge{
  display:inline-block;
  padding:4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(0,0,0,.06);
  color: var(--brand-secondary);
}

.container{
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.card{
  background: var(--card);
  border:1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-h{
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.card-b{padding: 16px}

.h1{font-size: 18px; font-weight:800; margin:0}
.h2{font-size: 14px; font-weight:800; margin:0}
.muted{color: var(--muted)}

.grid{
  display:grid;
  gap:14px;
}
.grid.cols-2{grid-template-columns: repeat(2, minmax(0,1fr));}
.grid.cols-3{grid-template-columns: repeat(3, minmax(0,1fr));}

@media (max-width: 900px){
  .grid.cols-2,.grid.cols-3{grid-template-columns:1fr}
}

.table{
  width:100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th,.table td{
  padding:10px 10px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align: top;
}
.table th{font-size:12px; text-transform:uppercase; letter-spacing:.06em; color: var(--muted)}

.kbd{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(0,0,0,.06);
  padding:2px 6px;
  border-radius: 8px;
  font-size: 12px;
}

/* Layout Shell */
.shell{
  min-height:100vh;
  display:flex;
}
.sidebar{
  width: var(--sidebar);
  background: #fff;
  border-right:1px solid var(--border);
  padding:16px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
}
.main{
  flex:1;
  min-width:0;
}
.topbar{
  background:#fff;
  border-bottom:1px solid var(--border);
  padding: 12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  position: sticky;
  top:0;
  z-index: 5;
}
.brand{
  display:flex; align-items:center; gap:10px;
}
.brand-logo{
  width:40px; height:40px; border-radius: 12px;
  object-fit: contain;
  background: var(--brand-tertiary);
  border:1px solid var(--border);
}
.nav{
  margin-top: 14px;
  display:flex; flex-direction:column; gap:6px;
}
.nav a{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 10px;
  border-radius: 12px;
  text-decoration:none;
  color: var(--brand-secondary);
}
.nav a.active{background: rgba(28,158,83,.12); color: var(--brand-secondary); font-weight:700;}
.nav a:hover{background: rgba(0,0,0,.04)}

.sidebar-foot{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

/* Overlay (FULLSCREEN) */
.overlay{
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 9999;
}
.overlay.hidden{display:none}
.overlay-card{
  width:min(420px, calc(100% - 30px));
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display:flex;
  flex-direction:column;
  gap: 10px;
  align-items:center;
  text-align:center;
}
.spinner{
  width:38px;height:38px;border-radius:50%;
  border:4px solid rgba(0,0,0,.12);
  border-top-color: var(--brand-primary);
  animation: spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

.overlay-title{font-weight:800}
.overlay-sub{color: var(--muted); font-size: 13px}

/* Login */
.login-wrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.login-card{
  width:min(440px, 100%);
  padding: 18px;
}
.login-head{display:flex; align-items:center; gap:12px; margin-bottom:10px}
.login-title{margin:0; font-size: 18px; font-weight:900}
.login-tagline{margin:2px 0 0 0; color: var(--muted); font-size: 13px}

/* Calendar */
.cal-grid{
  display:grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
  gap:8px;
}
.cal-cell{
  border:1px solid var(--border);
  border-radius: 12px;
  padding:10px;
  background:#fff;
  min-height:80px;
}
.cal-cell .date{font-weight:800; font-size:12px}
.cal-cell.workday{outline:2px solid rgba(28,158,83,.25)}
.cal-cell.off{opacity:.65}
.cal-note{font-size:12px; color: var(--muted); margin-top:6px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}

.table-wrap{width:100%; overflow:auto; border-radius: var(--radius);}
.table-wrap .table{min-width: 900px;}

.pager{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin-top:12px; flex-wrap:wrap;
}
.pager .muted{font-size:12px}

/* HIDE default credential hint on login page only */
#app .login-wrap .login-card #btnLogin + .muted {
  display: none !important;
}
