@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Lora:wght@600;700&family=Noto+Sans+Telugu:wght@400;500;600&display=swap');

* { margin:0; padding:0; box-sizing:border-box; }

:root {
  --orange: #f47b20;
  --orange-deep: #d9620c;
  --green: #5cb82e;
  --green-deep: #418c1f;
  --forest: #143028;
  --ink: #141414;
  --paper: #faf8f4;
  --paper-warm: #f3efe6;
  --line: #e3ddd0;
  --gray: #6b6358;
  --red: #d64545;
  --white: #fff;
}

body {
  font-family: 'Inter', 'Noto Sans Telugu', sans-serif;
  background: var(--paper-warm);
  color: var(--ink);
}

a { text-decoration:none; color: inherit; }

/* ---------- LOGIN ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--forest);
}
.login-card {
  background: white;
  border-radius: 16px;
  padding: 40px 36px;
  width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.login-card img { height: 56px; margin: 0 auto 16px; display:block; }
.login-card h1 { font-family:'Lora',serif; font-size:21px; text-align:center; margin-bottom:4px; }
.login-card p.sub { text-align:center; color:var(--gray); font-size:13px; margin-bottom:26px; }
.login-card label { font-size:12.5px; font-weight:600; color:var(--gray); display:block; margin-bottom:6px; }
.login-card input {
  width:100%; padding:12px 14px; border:1.5px solid var(--line); border-radius:8px;
  font-size:14.5px; margin-bottom:16px; font-family:inherit;
}
.login-card input:focus { outline:2px solid var(--orange); border-color:var(--orange); }
.login-card button {
  width:100%; padding:13px; background:var(--orange); color:white; border:none;
  border-radius:8px; font-weight:700; font-size:14.5px; cursor:pointer; transition:background 0.15s;
}
.login-card button:hover { background:var(--orange-deep); }
.login-error { background:#fdecec; color:var(--red); padding:10px 14px; border-radius:8px; font-size:13px; margin-bottom:16px; }
.login-hint { background:var(--paper-warm); padding:10px 14px; border-radius:8px; font-size:12px; color:var(--gray); margin-top:18px; text-align:center; }

/* ---------- SHELL LAYOUT ---------- */
.shell { display:flex; min-height:100vh; }

.sidebar {
  width: 240px;
  background: var(--forest);
  color: rgba(255,255,255,0.8);
  flex-shrink:0;
  display:flex;
  flex-direction:column;
}
.sidebar-brand { display:flex; align-items:center; gap:10px; padding:22px 20px; border-bottom:1px solid rgba(255,255,255,0.08); }
.sidebar-brand img { width:36px; height:36px; border-radius:8px; background:white; padding:3px; }
.sidebar-brand strong { color:white; font-family:'Lora',serif; font-size:15px; display:block; }
.sidebar-brand span { font-size:10.5px; color:rgba(255,255,255,0.5); text-transform:uppercase; letter-spacing:0.5px; }

.sidebar-nav { flex:1; padding:16px 12px; display:flex; flex-direction:column; gap:3px; }
.sidebar-nav a {
  display:flex; align-items:center; gap:10px; padding:10px 14px; border-radius:8px;
  font-size:13.5px; font-weight:500; color:rgba(255,255,255,0.72);
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav a:hover { background:rgba(255,255,255,0.06); color:white; }
.sidebar-nav a.active { background:var(--orange); color:white; font-weight:600; }
.sidebar-nav .nav-icon { width:17px; height:17px; flex-shrink:0; }

.sidebar-foot { padding:16px 20px; border-top:1px solid rgba(255,255,255,0.08); }
.sidebar-foot .who { font-size:12.5px; color:white; font-weight:600; }
.sidebar-foot .role { font-size:11px; color:rgba(255,255,255,0.5); margin-bottom:10px; }
.sidebar-foot a.logout { font-size:12.5px; color:#ffb3b3; font-weight:600; }

.main { flex:1; min-width:0; }
.topbar {
  background:white; border-bottom:1px solid var(--line); padding:18px 32px;
  display:flex; justify-content:space-between; align-items:center;
}
.topbar h1 { font-family:'Lora',serif; font-size:21px; }
.topbar .view-site { font-size:12.5px; font-weight:600; color:var(--orange-deep); border:1.5px solid var(--orange); padding:8px 14px; border-radius:7px; }

.content { padding:28px 32px; max-width:1100px; }

/* ---------- COMPONENTS ---------- */
.card { background:white; border:1px solid var(--line); border-radius:12px; padding:24px; margin-bottom:20px; }
.card h2 { font-size:16px; font-family:'Lora',serif; margin-bottom:4px; }
.card .desc { font-size:12.5px; color:var(--gray); margin-bottom:18px; }

.stat-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:24px; }
.stat-card { background:white; border:1px solid var(--line); border-radius:12px; padding:18px 20px; }
.stat-card .n { font-size:26px; font-weight:800; color:var(--forest); }
.stat-card .l { font-size:12px; color:var(--gray); margin-top:2px; }

table.admin-table { width:100%; border-collapse:collapse; }
table.admin-table th {
  text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:0.5px;
  color:var(--gray); padding:10px 14px; border-bottom:2px solid var(--line); font-weight:700;
}
table.admin-table td { padding:12px 14px; font-size:13.5px; border-bottom:1px solid var(--line); }
table.admin-table tr:hover td { background:var(--paper-warm); }

.btn {
  display:inline-flex; align-items:center; gap:6px; padding:9px 16px; border-radius:7px;
  font-weight:600; font-size:13px; cursor:pointer; border:none; font-family:inherit;
}
.btn-primary { background:var(--orange); color:white; }
.btn-primary:hover { background:var(--orange-deep); }
.btn-outline { background:transparent; border:1.5px solid var(--line); color:var(--ink); }
.btn-outline:hover { border-color:var(--orange); }
.btn-danger { background:#fdecec; color:var(--red); }
.btn-danger:hover { background:#f9d4d4; }
.btn-sm { padding:6px 12px; font-size:12px; }

.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.field-group { margin-bottom:16px; }
.field-group label { font-size:12.5px; font-weight:600; color:var(--gray); display:block; margin-bottom:6px; }
.field-group input, .field-group select, .field-group textarea {
  width:100%; padding:10px 13px; border:1.5px solid var(--line); border-radius:7px; font-size:13.5px; font-family:inherit;
}
.field-group input:focus, .field-group select:focus, .field-group textarea:focus { outline:2px solid var(--orange); border-color:var(--orange); }
.field-group .hint { font-size:11.5px; color:var(--gray); margin-top:4px; }

.badge { font-size:11px; font-weight:700; padding:3px 10px; border-radius:12px; display:inline-block; }
.badge-upcoming { background:rgba(244,123,32,0.14); color:var(--orange-deep); }
.badge-completed { background:rgba(92,184,46,0.14); color:var(--green-deep); }
.badge-new { background:rgba(244,123,32,0.14); color:var(--orange-deep); }
.badge-resolved { background:rgba(92,184,46,0.14); color:var(--green-deep); }

.flash { padding:12px 16px; border-radius:8px; font-size:13.5px; font-weight:600; margin-bottom:18px; }
.flash-success { background:rgba(92,184,46,0.12); color:var(--green-deep); }
.flash-error { background:#fdecec; color:var(--red); }

.empty-state { text-align:center; padding:50px 20px; color:var(--gray); font-size:13.5px; }

@media (max-width: 900px) {
  .sidebar { display:none; }
  .form-grid { grid-template-columns:1fr; }
  .stat-cards { grid-template-columns:repeat(2,1fr); }
}
