:root{
  --fc-blue:#0d3b66;
  --fc-light:#1d6fa5;
  --fc-accent:#2bb0ed;
  --fc-bg:#f5f7fb;
  --fc-text:#111827;
  --fc-muted:#6b7280;
  --fc-card:#ffffff;
  --fc-border:#e5e7eb;
  --fc-shadow:0 1px 2px rgba(0,0,0,.06);
  --fc-radius:14px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:var(--fc-bg);
  color:var(--fc-text);
}

a{color:inherit}
.container{max-width:1200px;margin:0 auto;padding:16px}

.fc-header{
  position:sticky;top:0;z-index:50;
  display:flex;justify-content:space-between;align-items:center;
  background:#fff;border-bottom:1px solid var(--fc-border);
  padding:10px 14px;
}
.fc-header-left{display:flex;align-items:center;gap:10px}
.fc-logo{height:34px}
.fc-menu-btn{
  display:none;
  border:1px solid var(--fc-border);
  background:#fff;border-radius:12px;
  padding:8px 10px;font-size:18px;cursor:pointer;
}
.fc-header-right{display:flex;align-items:center;gap:12px}
.fc-userbox{line-height:1.1;text-align:right}
.fc-userbox small{color:var(--fc-muted)}
.badge{
  display:inline-block;border:1px solid var(--fc-border);
  padding:2px 8px;border-radius:999px;font-size:12px;color:var(--fc-muted);
}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 12px;border-radius:12px;border:1px solid var(--fc-border);
  background:#fff;cursor:pointer;text-decoration:none;
}
.btn.primary{background:var(--fc-blue);border-color:var(--fc-blue);color:#fff}
.btn.ghost{background:transparent}
.btn:disabled{opacity:.5;cursor:not-allowed}

.layout{display:flex;min-height:calc(100vh - 58px)}
.fc-sidebar{
  width:240px;flex:0 0 240px;
  background:#fff;border-right:1px solid var(--fc-border);
  padding:14px;position:sticky;top:58px;height:calc(100vh - 58px);overflow:auto;
}
.nav-title{margin:14px 10px 6px;color:var(--fc-muted);font-size:12px;text-transform:uppercase}
.fc-sidebar a{
  display:flex;gap:10px;align-items:center;
  padding:10px 10px;border-radius:12px;text-decoration:none;color:var(--fc-text);
}
.fc-sidebar a:hover{background:var(--fc-bg)}
.fc-sidebar a.active{background:rgba(43,176,237,.12);border:1px solid rgba(43,176,237,.25)}
.main{flex:1; padding:16px}
.card{
  background:var(--fc-card);border:1px solid var(--fc-border);
  border-radius:var(--fc-radius);box-shadow:var(--fc-shadow);
  padding:14px;
}
.grid{display:grid;gap:14px}
.grid.cards{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:980px){.grid.cards{grid-template-columns:1fr}}
.h1{font-size:22px;margin:0 0 8px}
.muted{color:var(--fc-muted)}
.kpi{font-size:26px;font-weight:700}
hr.sep{border:none;border-top:1px solid var(--fc-border);margin:14px 0}

.form-row{display:grid;gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:980px){.form-row{grid-template-columns:1fr}}
label{display:block;font-size:13px;color:var(--fc-muted);margin:0 0 6px}
input,select,textarea{
  width:100%;
  border:1px solid var(--fc-border);
  border-radius:12px;
  padding:10px;
  font:inherit;
  background:#fff;
}
textarea{min-height:90px;resize:vertical}
.table{width:100%;border-collapse:collapse}
.table th,.table td{padding:10px;border-bottom:1px solid var(--fc-border);text-align:left;vertical-align:top;font-size:13px}
.table th{color:var(--fc-muted);font-weight:600}
.table-wrap{overflow:auto}

details.accordion{
  border:1px solid var(--fc-border);border-radius:var(--fc-radius);
  background:#fff;margin-top:12px;padding:10px;
}
details.accordion summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:center;gap:10px}
details.accordion summary::-webkit-details-marker{display:none}
.pills{display:flex;gap:8px;flex-wrap:wrap}

.fc-footer{
  border-top:1px solid var(--fc-border);
  background:#fff;
  padding:14px 16px;
  color:var(--fc-muted);
  font-size:13px;
  text-align:center;
}

.mobile-only{display:none}
@media(max-width:980px){
  .fc-menu-btn{display:inline-flex}
  .fc-sidebar{
    position:fixed;top:58px;left:0;height:calc(100vh - 58px);
    transform:translateX(-105%);transition:.25s;z-index:60;
    box-shadow:0 10px 25px rgba(0,0,0,.12);
  }
  .fc-sidebar.open{transform:translateX(0)}
  .mobile-only{display:block}
}


/* Form layout: date 1/3, task 2/3 */
.form-row-taskdate{grid-template-columns:1fr 2fr}
@media(max-width:980px){.form-row-taskdate{grid-template-columns:1fr}}

.field-error{border-color:#ef4444 !important; box-shadow:0 0 0 3px rgba(239,68,68,.15)}
