:root{
  --bg:#F3F5F7;
  --card:#FFFFFF;
  --border:#E6EAF0;
  --shadow:0 6px 20px rgba(16,24,40,.08);
  --radius:12px;

  --accent:#18A999;
  --navy:#1F3A5F;

  --success:#22C55E;
  --warning:#F59E0B;
  --danger:#EF4444;
  --info:#3B82F6;

  --text:#0F172A;
  --muted:#64748B;

  --sidebar-collapsed:72px;
  --sidebar-expanded:240px;
  --topbar-h:64px;

  --font: system-ui, -apple-system, "Segoe UI", Inter, Arial, sans-serif;
}

/* GOLD THEME (body[data-theme="gold"]) */
body[data-theme="gold"]{
  --bg:#F6F6F6;
  --card:#FFFFFF;
  --border:#E5E7EB;
  --shadow:0 6px 20px rgba(0,0,0,.06);

  --accent:#C6A756;
  --navy:#2F2F2F;

  --text:#1F1F1F;
  --muted:#6B7280;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

/* =========================
   APP LAYOUT
========================= */
.app{
  display:flex;
  min-height:100vh;
}

/* =========================
   SIDEBAR
========================= */
.sidebar{
  width:var(--sidebar-expanded);
  background:#fff;
  border-right:1px solid var(--border);
  position:sticky;
  top:0;
  height:100vh;
  padding:14px 10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:hidden; /* prevents bg bleed */
  transition: width .18s ease; /* smoother desktop collapse */
}

.sidebar.collapsed{ width:var(--sidebar-collapsed); }

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:10px;
}

.brand .logo{
  width:34px;height:34px;border-radius:10px;
  background:rgba(24,169,153,.12);
  display:flex;align-items:center;justify-content:center;
  color:var(--accent);
  font-weight:800;
}
body[data-theme="gold"] .brand .logo{ background:rgba(198,167,86,.14); }

.brand .title{ font-weight:800; color:var(--navy); line-height:1.1; }
.brand .subtitle{ font-size:12px; color:var(--muted); }

.sidebar.collapsed .title,
.sidebar.collapsed .subtitle{ display:none; }

/* NAV SCROLL AREA */
.nav.navScroll{
  flex:1 1 auto;
  min-height:0;
  overflow:auto;
  padding:6px 6px 10px;
  scrollbar-width:none;     /* Firefox */
  -ms-overflow-style:none;  /* old Edge */
}
.nav.navScroll::-webkit-scrollbar{ width:0; height:0; }

/* NAV STACK */
.nav{
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* NAV ROWS (links + accordion buttons) */
.nav a,
.nav .navGroupBtn{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  color:#0f172a;
  border:1px solid transparent;
  background:transparent;
  font-size:16px;
  font-weight:500;
  line-height:1.2;
  text-decoration:none;
}

.nav a:hover,
.nav .navGroupBtn:hover{
  background:#F8FAFC;
  border-color:var(--border);
}

.nav a.active{
  background:rgba(24,169,153,.10);
  border-color:rgba(24,169,153,.25);
}

body[data-theme="gold"] .nav a.active{
  background:rgba(198,167,86,.14);
  border-color:rgba(198,167,86,.28);
  position:relative;
}
body[data-theme="gold"] .nav a.active::before{
  content:"";
  position:absolute;
  left:0; top:8px; bottom:8px;
  width:3px;
  border-radius:999px;
  background:var(--accent);
}

.nav .icon{
  width:20px;height:20px;flex:0 0 20px;
  display:inline-flex;align-items:center;justify-content:center;
  color:var(--accent);
}

.sidebar.collapsed .nav span.label{ display:none; }

/* ACCORDION GROUPS */
.navGroup{ margin:2px 0; }
.navGroupBtn{
  cursor:pointer;
  border:1px solid transparent;
}
.navGroupBtn .chev{
  margin-left:auto;
  opacity:.7;
  font-size:12px;
  transition:transform .18s ease;
}

/* rotate when open */
.navGroup[data-open="1"] .navGroupBtn .chev{ transform:rotate(180deg); }

/* Submenu: left aligned (no indent) + consistent font */
.navGroupSub{
  display:none;
  padding-left:0;
  margin-top:2px;
}
.navGroup[data-open="1"] .navGroupSub{ display:block; }

.navGroupSub a{
  padding:10px 12px;
  margin:2px 0;
  font-size:16px;     /* match main */
  font-weight:500;    /* match main */
  border-radius:10px;
  color:#0f172a;
  border:1px solid transparent;
  display:flex;
  align-items:center;
  gap:10px;
}
.navGroupSub a:hover{
  background:#F8FAFC;
  border-color:var(--border);
}

/* My Resources mini block */
.navMiniBlock{
  margin-top:8px;
  padding:8px 10px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
}
.navMiniTitle{
  font-size:12px;
  color:var(--muted);
  font-weight:700;
  margin:8px 0 6px;
}
.navMiniLinks a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border-radius:10px;
  margin:2px 0;
  color:#0f172a;
  border:1px solid transparent;
  font-size:16px;     /* keep consistent */
  font-weight:500;
}
.navMiniLinks a:hover{
  background:#F8FAFC;
  border-color:var(--border);
}

/* Sidebar footer */
.sidebarFooter{
  flex:0 0 auto;
  padding:10px 12px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
  background:#fff;
}

/* =========================
   MAIN / TOPBAR
========================= */
.main{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.topbar{
  height:var(--topbar-h);
  background:#fff;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  position:sticky;
  top:0;
  z-index:10;
}

.leftTop{ display:flex; align-items:center; gap:10px; }

.iconBtn{
  width:40px;height:40px;
  border-radius:10px;
  border:1px solid var(--border);
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:var(--navy);
}
.iconBtn:hover{ background:#F8FAFC; }

.search{
  width:min(520px, 52vw);
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  color:var(--muted);
}
.search input{
  border:0;
  outline:none;
  width:100%;
  font-size:14px;
  background:transparent;
  color:var(--text);
}

.rightTop{ display:flex; align-items:center; gap:10px; }

.chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:13px;
  color:var(--muted);
}
.avatar{
  width:32px;height:32px;border-radius:999px;
  background:#E2E8F0;
  display:inline-flex;align-items:center;justify-content:center;
  font-weight:800;color:#334155;
}

/* =========================
   BUTTONS
========================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:#0f172a;
  cursor:pointer;
  font-weight:600;
  text-decoration:none;
}
.btn:hover{ background:#F8FAFC; text-decoration:none; }

.btn.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btn.primary:hover{ filter:brightness(.97); }

.btn.full{ width:100%; }

/* =========================
   CONTENT / GRID / CARDS
   (single source of truth — prevents overlap)
========================= */
.content{ padding:16px; }

.grid{
  display:grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap:12px;
  align-items:start;
}

.c12{ grid-column: span 12; }
.c8 { grid-column: span 12; }
.c6 { grid-column: span 12; }
.c4 { grid-column: span 12; }

@media(min-width: 980px){
  .c8{ grid-column: span 8; }
  .c6{ grid-column: span 6; }
  .c4{ grid-column: span 4; }
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
  min-width:0;
}

.hRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.hTitle{
  font-size:16px;
  font-weight:800;
  color:var(--navy);
  margin:0;
}

.muted{ color:var(--muted); }
.sep{ height:1px; background:var(--border); margin:10px 0; }

.list{ display:flex; flex-direction:column; gap:10px; }

.rowItem{
  display:flex;
  gap:10px;
  align-items:flex-start;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  min-width:0;
}
.rowItem:hover{ background:#F8FAFC; }

.badge{
  display:inline-flex;
  align-items:center;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:12px;
  color:var(--muted);
  background:#fff;
}

/* =========================
   FORMS (fix shrunk inputs everywhere)
========================= */
label{ display:block; }

input, textarea, select{
  font-family:var(--font);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
  background:#fff;
  color:var(--text);
  width:100%;
  max-width:100%;
}

textarea{ min-height:120px; resize:vertical; }

input:focus, textarea:focus, select:focus{
  border-color: rgba(24,169,153,.35);
  box-shadow: 0 0 0 3px rgba(24,169,153,.10);
}
body[data-theme="gold"] input:focus,
body[data-theme="gold"] textarea:focus,
body[data-theme="gold"] select:focus{
  border-color: rgba(198,167,86,.40);
  box-shadow: 0 0 0 3px rgba(198,167,86,.12);
}

input[type="file"]{ padding:10px; }

/* =========================
   MOBILE SIDEBAR (smooth slide)
========================= */
@media(max-width: 720px){
  .search{ display:none; }

  .sidebar{
    position:fixed;
    top:0;
    bottom:0;
    left:0; /* controlled by transform */
    width:260px;
    max-width:86vw;
    z-index:50;
    transform: translateX(-105%);
    transition: transform .24s cubic-bezier(.2,.9,.2,1);
    will-change: transform;
    -webkit-overflow-scrolling: touch;
  }

  body.sidebarOpen .sidebar,
  .sidebar.open{
    transform: translateX(0);
  }

  .sidebarScrim{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,.35);
    z-index:40;
    opacity:0;
    pointer-events:none;
    transition: opacity .2s ease;
    display:block;
  }

  body.sidebarOpen .sidebarScrim,
  .sidebarScrim.open{
    opacity:1;
    pointer-events:auto;
  }

  body.sidebarOpen{
    overflow:hidden;
    touch-action:none;
  }

  .content{ padding:12px; }
}

/* Gold Luxe polish */
body[data-theme="gold"] .sidebar{
  background:#FCFCFD;
  border-right:1px solid #E7E3D6;
}
body[data-theme="gold"] .topbar{
  background:#FFFFFF;
  border-bottom:1px solid #E7E3D6;
}
body[data-theme="gold"] .nav a:hover,
body[data-theme="gold"] .rowItem:hover,
body[data-theme="gold"] .iconBtn:hover,
body[data-theme="gold"] .btn:hover{
  background:#FAF7EF;
}
body[data-theme="gold"] .chip{ border-color:#E7E3D6; }

/* =========================
   PROFILE: SERVICES UI FIX
   Add to VERY BOTTOM of /hr/assets/css/app.css
========================= */

/* section wrapper (inside profile card) */
.svcSection{
  margin-top: 12px;
}

.svcHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
}
.svcHeader .muted{ margin:0; }

/* each category card */
.svcCat{
  border:1px solid var(--border);
  background:#fff;
  border-radius:14px;
  padding:14px;
}
.svcCat + .svcCat{ margin-top:12px; }

.svcCatTitle{
  font-size:16px;
  font-weight:900;
  color:var(--navy);
  margin:0 0 10px 0;
}

/* pills grid */
.svcPills{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap:10px;
  align-items:start;
}

/* pill label (checkbox + text) */
.svcPill{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  cursor:pointer;
  user-select:none;
  min-width:0;
}

.svcPill:hover{ background:#F8FAFC; }

.svcPill input[type="checkbox"]{
  width:18px;
  height:18px;
  flex:0 0 18px;
  margin:0;
}

.svcPill .svcText{
  display:block;
  line-height:1.2;
  color:var(--text);
  font-weight:600;
  white-space:normal;     /* allow wrap */
  word-break:break-word;
  min-width:0;
}

/* keep things comfy on small phones */
@media (max-width: 520px){
  .svcPills{ grid-template-columns: 1fr; }
  .svcPill{ border-radius:16px; }
}