:root{
  --fc-navy:#1F3864; --fc-navy-light:#2E4A7F; --fc-red:#D7263D; --fc-red-light:#F6D9DD;
  --fc-cream:#FAF8F4; --fc-line:#E4E0D8; --fc-ink:#22221F; --fc-muted:#75726A;
}
*{box-sizing:border-box;}
body{
  margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif;
  color:var(--fc-ink); background:var(--fc-cream);
}
button{font-family:inherit;}

.fc-login-screen{
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px;
  background:linear-gradient(180deg,#FAF8F4 0%,#F1EEE6 100%);
}
.fc-login-card{
  background:#fff; border:1px solid var(--fc-line); border-radius:14px; padding:32px 30px;
  width:100%; max-width:360px; box-shadow:0 10px 30px rgba(31,56,100,0.08);
}
.fc-login-card h1{font-size:17px; margin:22px 0 18px; color:var(--fc-navy);}
.fc-brand-lockup{display:flex; align-items:center; gap:12px;}
.fc-wordmark{font-size:20px; font-weight:700;}
.fc-wordmark span:first-child{color:var(--fc-navy);}
.fc-wordmark span:last-child{color:var(--fc-red);}
.fc-tag{font-size:11px; color:var(--fc-muted); margin-top:2px;}

.fc-field{margin-bottom:14px;}
.fc-field label{display:block; font-size:11px; font-weight:600; color:var(--fc-muted); margin-bottom:5px;}
.fc-field input,.fc-field select,.fc-field textarea{
  width:100%; padding:9px 11px; font-size:14px; border:1px solid var(--fc-line);
  border-radius:8px; background:#fff; color:var(--fc-ink);
}
.fc-field textarea{resize:vertical; min-height:60px;}
.fc-error{font-size:12px; color:var(--fc-red); margin:-6px 0 12px; min-height:14px;}

.fc-btn{
  background:var(--fc-navy); color:#fff; border:none; padding:10px 18px; font-size:13.5px;
  font-weight:600; border-radius:8px; cursor:pointer;
}
.fc-btn:hover{background:var(--fc-navy-light);}
.fc-btn-block{width:100%;}
.fc-btn-sm{padding:6px 12px; font-size:12px;}
.fc-btn-ghost{
  background:#fff; color:var(--fc-navy); border:1px solid var(--fc-navy);
  padding:8px 14px; font-size:12.5px; font-weight:600; border-radius:8px; cursor:pointer;
}
.fc-btn-danger{background:none; border:none; color:var(--fc-red); font-size:12px; font-weight:600; cursor:pointer;}

.fc-app-shell{min-height:100vh; display:flex; flex-direction:column;}
.fc-topbar{
  display:flex; align-items:center; justify-content:space-between; padding:10px 20px;
  background:#fff; border-bottom:1px solid var(--fc-line); position:sticky; top:0; z-index:10;
}
.fc-brand-lockup-sm .fc-wordmark-sm{font-size:15px;}
.fc-topbar-right{display:flex; align-items:center; gap:14px;}
.fc-user-name{font-size:13px; font-weight:600; color:var(--fc-navy);}
.fc-icon-btn{
  background:none; border:none; font-size:18px; cursor:pointer; position:relative; padding:4px;
}
.fc-badge-count{
  position:absolute; top:-2px; right:-2px; background:var(--fc-red); color:#fff;
  font-size:10px; font-weight:700; border-radius:10px; padding:1px 5px; line-height:1.3;
}

.fc-tabs{display:flex; gap:2px; padding:0 20px; background:#fff; border-bottom:1px solid var(--fc-line);}
.fc-tab{padding:12px 16px; font-size:13px; font-weight:600; color:var(--fc-muted); cursor:pointer; border-bottom:2px solid transparent;}
.fc-tab.active{color:var(--fc-navy); border-bottom-color:var(--fc-red);}

.fc-main{flex:1; padding:20px; max-width:1100px; margin:0 auto; width:100%;}
.fc-view{display:none;}
.fc-view.active{display:block;}

.fc-card{background:#fff; border:1px solid var(--fc-line); border-radius:10px; padding:16px 18px; margin-bottom:14px;}
.fc-section-title{font-size:11px; font-weight:700; color:var(--fc-navy); text-transform:uppercase; letter-spacing:.05em; margin:0 0 12px;}

.fc-toolbar{display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; flex-wrap:wrap; gap:10px;}
.fc-toolbar h2{font-size:18px; margin:0; color:var(--fc-navy);}

table.fc-table{width:100%; border-collapse:collapse; font-size:12.5px;}
table.fc-table th{
  text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.03em;
  color:var(--fc-muted); border-bottom:1px solid var(--fc-line); padding:8px;
}
table.fc-table td{padding:9px 8px; border-bottom:1px solid var(--fc-line); vertical-align:middle;}
table.fc-table tr:hover{background:var(--fc-cream); cursor:pointer;}

.fc-status-pill{font-size:11px; font-weight:600; padding:3px 9px; border-radius:20px; white-space:nowrap;}
.fc-empty{text-align:center; padding:40px 10px; color:var(--fc-muted); font-size:13px;}

.fc-metrics{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin-bottom:14px;}
.fc-metric{background:var(--fc-cream); border-radius:8px; padding:14px 16px;}
.fc-metric-label{font-size:11px; color:var(--fc-muted); margin-bottom:4px;}
.fc-metric-val{font-size:24px; font-weight:700; color:var(--fc-navy);}

.fc-drawer{
  position:fixed; top:0; right:0; height:100vh; width:340px; max-width:90vw;
  background:#fff; box-shadow:-6px 0 20px rgba(0,0,0,0.1); z-index:30;
  display:flex; flex-direction:column;
}
.fc-drawer-header{
  padding:16px 18px; border-bottom:1px solid var(--fc-line); font-weight:700; color:var(--fc-navy);
  display:flex; justify-content:space-between; align-items:center;
}
.fc-drawer-body{flex:1; overflow-y:auto; padding:10px 14px;}
.fc-reminder-item{padding:10px 6px; border-bottom:1px solid var(--fc-line); font-size:12.5px; line-height:1.5;}
.fc-reminder-item.unread{background:var(--fc-red-light);}
.fc-reminder-time{font-size:10.5px; color:var(--fc-muted); margin-top:3px;}

.fc-modal-overlay{
  position:fixed; inset:0; background:rgba(34,34,31,0.4); z-index:40;
  display:flex; align-items:center; justify-content:center; padding:16px;
}
.fc-modal{background:#fff; border-radius:12px; width:100%; max-width:520px; max-height:88vh; overflow-y:auto;}
.fc-modal-header{
  padding:16px 20px; border-bottom:1px solid var(--fc-line); font-weight:700; color:var(--fc-navy);
  display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; background:#fff;
}
.fc-modal-body{padding:18px 20px;}

.fc-doc-row{display:flex; align-items:center; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--fc-line); font-size:13px;}
.fc-doc-status-ok{color:#3B6D11; font-weight:600; font-size:12px;}
.fc-doc-status-pending{color:var(--fc-muted); font-size:12px;}

@media (max-width: 640px){
  .fc-main{padding:14px;}
  .fc-topbar{padding:10px 14px;}
}
