:root {
  --bg: #f4f7fb;
  --panel: rgba(255,255,255,.92);
  --panel-strong: #ffffff;
  --text: #18323f;
  --muted: #637381;
  --primary: #146c63;
  --primary-dark: #0e524b;
  --accent: #e63946;
  --border: #d9e4ec;
  --shadow: 0 25px 60px rgba(0,0,0,.15);
  --sidebar: #0f172a;
  --sidebar-link: rgba(255,255,255,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Arial, Helvetica, sans-serif; color: var(--text); background: var(--bg); }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(10, 30, 40, .72), rgba(20, 108, 99, .38)),
    url('assets/background-bolsel.jpg') center/cover no-repeat;
}
.login-card {
  width: min(980px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 28px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 32px 80px rgba(0,0,0,.28);
}
.login-hero {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}
.brand {
  display: flex;
  gap: 16px;
  align-items: center;
}
.brand img {
  width: 74px;
  height: 86px;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.2));
}
.brand-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-title strong {
  font-size: 30px;
  line-height: 1.05;
}
.brand-title span {
  color: rgba(255,255,255,.86);
  font-size: 14px;
  letter-spacing: .5px;
}
.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
}
.hero-copy p {
  max-width: 540px;
  color: rgba(255,255,255,.9);
  font-size: 16px;
  line-height: 1.7;
}
.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-badges span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  font-size: 13px;
}
.login-panel {
  background: rgba(255,255,255,.92);
  padding: 42px 34px;
  display: flex;
  align-items: center;
}
.login-box {
  width: 100%;
}
.login-box h2 { margin: 0 0 10px; font-size: 28px; }
.login-box p { margin: 0 0 26px; color: var(--muted); line-height: 1.6; }
.form-grid { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 700; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 13px 14px;
  color: var(--text);
}
.field textarea { min-height: 110px; resize: vertical; }
.btn {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  transition: .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #edf3f7; color: var(--text); }
.btn-danger { background: #d63a47; color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.error-box {
  display: none;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fde8ea;
  color: #9f2033;
  border: 1px solid #f6b8c0;
}
.error-box.show { display: block; }
.login-footer { margin-top: 18px; color: var(--muted); font-size: 13px; line-height: 1.6; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 290px 1fr;
}
.sidebar {
  background: var(--sidebar);
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.sidebar .brand img { width: 56px; height: 64px; }
.sidebar .brand-title strong { font-size: 22px; }
.sidebar .brand-title span { font-size: 12px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav button {
  text-align: left;
  border: 0;
  padding: 13px 14px;
  border-radius: 14px;
  color: #e5eef5;
  background: var(--sidebar-link);
}
.sidebar nav button.active,
.sidebar nav button:hover { background: rgba(255,255,255,.15); }
.sidebar .sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: grid;
  gap: 12px;
}
.sidebar .user-card {
  padding: 12px 14px;
  background: rgba(255,255,255,.08);
  border-radius: 14px;
}
.sidebar .user-card strong { display: block; }
.sidebar .user-card span { color: #cdd8e3; font-size: 13px; }

.main {
  padding: 24px;
  background: linear-gradient(180deg, #eef5f8 0%, #f8fbfc 100%);
}
.topbar {
  background: linear-gradient(135deg, rgba(20,108,99,.93), rgba(8,53,68,.88)), url('assets/background-bolsel.jpg') center/cover;
  border-radius: 24px;
  padding: 28px 30px;
  color: #fff;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}
.topbar h1 { margin: 0 0 6px; font-size: 34px; }
.topbar p { margin: 0; color: rgba(255,255,255,.88); max-width: 760px; line-height: 1.6; }
.topbar .pill {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.12);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
}
.cards {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
}
.metric-card, .panel {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(17,30,45,.06);
}
.metric-card { padding: 20px; }
.metric-card span { display: block; color: var(--muted); margin-bottom: 10px; }
.metric-card strong { font-size: 34px; }
.layout-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  margin-top: 18px;
}
.panel { padding: 22px; }
.panel h2 { margin: 0 0 16px; font-size: 22px; }
.panel p.helper { color: var(--muted); margin-top: -6px; line-height: 1.6; }
.table-wrap { overflow: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 760px; }
.table-wrap th, .table-wrap td { border-bottom: 1px solid var(--border); padding: 12px 10px; text-align: left; vertical-align: top; }
.table-wrap th { color: #51616f; font-size: 13px; background: #f7fafb; position: sticky; top: 0; }
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.status.menunggu { background: #fff3d9; color: #9e6a00; }
.status.disetujui { background: #dff1ff; color: #175da6; }
.status.ditolak { background: #fde4e7; color: #a72638; }
.status.dikembalikan { background: #dff7ea; color: #1d8653; }
.badge-available { background: #dff7ea; color: #1d8653; }
.badge-borrowed { background: #dff1ff; color: #175da6; }
.section-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.dual-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.full { grid-column: 1 / -1; }
.simple-list { display: grid; gap: 14px; }
.request-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}
.request-card h3 { margin: 0 0 10px; }
.request-card p { margin: 6px 0; line-height: 1.6; }
.inline-note { color: var(--muted); font-size: 13px; }
.empty-state {
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #fafcfd;
}
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.footer-note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.print-only { display: none; }

@media (max-width: 1100px) {
  .login-card,
  .app-shell,
  .layout-grid,
  .dual-grid,
  .request-card,
  .cards { grid-template-columns: 1fr; }
  .sidebar { position: relative; }
}
@media (max-width: 760px) {
  .login-screen { padding: 12px; }
  .login-card { min-height: auto; }
  .login-hero { display: none; }
  .topbar { padding: 24px 20px; }
  .topbar h1 { font-size: 28px; }
  .main { padding: 14px; }
}
@media print {
  .sidebar, .topbar .pill, .section-actions, .btn, .no-print { display: none !important; }
  .app-shell { display: block; }
  .main { padding: 0; background: #fff; }
  .topbar { background: #fff; color: #111; padding: 0 0 16px; box-shadow: none; border-radius: 0; }
  .topbar p { color: #333; }
  .panel, .metric-card { box-shadow: none; border: 1px solid #ccc; }
  .print-only { display: block; }
}
