*{box-sizing:border-box}
:root{
  --bg:#f3f5f8; --panel:#fff; --text:#18212f; --muted:#667085;
  --line:#e4e7ec; --dark:#111827; --soft:#f2f4f7;
}
html{scroll-behavior:smooth}
body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
input,select,textarea{width:100%;padding:11px 12px;border:1px solid #d0d5dd;border-radius:10px;background:#fff}
textarea{resize:vertical}
.btn{display:inline-flex;justify-content:center;align-items:center;border:0;border-radius:10px;padding:11px 15px;font-weight:700;background:var(--dark);color:#fff}
.btn.secondary{background:#e9edf2;color:#18212f}
.btn.ghost{background:#fff;color:#18212f;border:1px solid var(--line)}
.btn.full{width:100%}

.logo{width:36px;height:36px;border-radius:10px;background:#fff;color:#111827;display:grid;place-items:center;font-weight:800}
.logo.big{width:48px;height:48px;font-size:18px}

.login-page{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}
.login-hero{background:linear-gradient(135deg,#111827,#374151);color:#fff;padding:64px;display:flex;flex-direction:column;justify-content:center}
.login-hero h1{font-size:48px;line-height:1.05;max-width:650px;margin:24px 0 18px}
.login-hero p{font-size:18px;line-height:1.7;max-width:680px;color:#d1d5db}
.login-hero ul{padding-left:20px;line-height:2;color:#e5e7eb}
.login-side{display:flex;align-items:center;justify-content:center;padding:36px}
.login-card{width:min(430px,100%);background:#fff;border:1px solid var(--line);border-radius:20px;padding:30px;box-shadow:0 12px 30px rgba(15,23,42,.08)}
.login-card h2{margin:0 0 8px;font-size:28px}
.login-card>p{color:var(--muted);margin:0 0 24px}
.login-card small{display:block;text-align:center;color:var(--muted);margin-top:14px}
.field{display:flex;flex-direction:column;gap:7px;margin-bottom:14px}
.field label{font-size:13px;font-weight:700}

.app-shell{display:none}
.screen{display:none}
body:has(.screen:target) .login-page{display:none}
body:has(.screen:target) .app-shell{display:block}
.screen:target{display:block}

.topbar{height:68px;background:#111827;color:white;display:flex;align-items:center;justify-content:space-between;padding:0 24px}
.brand{display:flex;align-items:center;gap:12px;font-weight:800}
.user-pill{display:flex;align-items:center;gap:10px;background:#1f2937;border:1px solid #374151;border-radius:999px;padding:8px 12px;font-size:13px}
.avatar{width:28px;height:28px;border-radius:50%;background:#fff;color:#111827;display:grid;place-items:center;font-weight:800}

.layout{display:flex;min-height:calc(100vh - 68px)}
.sidebar{width:245px;background:#fff;border-right:1px solid var(--line);padding:18px 12px}
.sidebar a{display:block;padding:11px 12px;border-radius:10px;margin:2px 0;color:#344054}
.sidebar a:hover{background:#f2f4f7;font-weight:700}
.nav-title{padding:8px 12px;color:#98a2b3;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.nav-title.space{margin-top:16px}
.main{flex:1;padding:28px;min-width:0}

.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:22px}
.page-head h1{margin:0;font-size:30px}
.page-head p{margin:6px 0 0;color:var(--muted)}

.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}
.card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px}
.card span{font-size:13px;color:var(--muted);font-weight:700}
.card strong{display:block;font-size:34px;margin-top:6px}
.card small{color:#98a2b3}

.panel,.form-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px}
.panel-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.panel-head h3{margin:0}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;min-width:820px}
th,td{padding:13px 12px;border-bottom:1px solid var(--line);text-align:left;font-size:14px}
th{font-size:12px;color:#667085;background:#f9fafb;text-transform:uppercase}
td a{font-weight:700;text-decoration:underline}

.filters{display:grid;grid-template-columns:1fr 180px 180px;gap:10px;margin-bottom:16px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.field.full{grid-column:1/-1}
.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}

.badge{display:inline-block;padding:5px 9px;border-radius:999px;font-size:12px;font-weight:800}
.pending{background:#fff4e5;color:#9a4e00}
.progress{background:#eef4ff;color:#3538cd}
.done{background:#ecfdf3;color:#027a48}
.high{background:#fef3f2;color:#b42318}
.medium{background:#fff7e8;color:#b54708}
.low{background:#f2f4f7;color:#475467}

.details-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:18px}
.meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.meta-box{border:1px solid var(--line);border-radius:12px;padding:14px}
.meta-box small{display:block;color:var(--muted);margin-bottom:5px}
.status-update{margin-top:18px}
.status-update label{display:block;font-size:13px;font-weight:800;margin-bottom:7px}
.status-update>div{display:flex;gap:10px}
details{border-top:1px solid var(--line);padding:14px 0}
details:first-of-type{border-top:0}
summary{font-weight:700;cursor:pointer}
details p{color:var(--muted);margin:8px 0 0}

@media(max-width:980px){
  .cards{grid-template-columns:repeat(2,1fr)}
  .details-grid{grid-template-columns:1fr}
  .filters{grid-template-columns:1fr}
}
@media(max-width:760px){
  .login-page{grid-template-columns:1fr}
  .login-hero{display:none}
  .sidebar{display:none}
  .main{padding:18px}
  .cards{grid-template-columns:1fr}
  .form-grid,.meta-grid{grid-template-columns:1fr}
  .field.full{grid-column:auto}
  .page-head{flex-direction:column}
  .brand span{display:none}
}
