/* ============================================================
   Base styles for Aplikasi Kantor
   ============================================================ */

:root{
  --primary:#2563eb;
  --primary2:#1d4ed8;
  --bg:#0b1220;
  --card:#0f172a;
  --muted:#94a3b8;
  --text:#e5e7eb;
  --border:rgba(255,255,255,.10);
  --danger:#ef4444;
  --success:#22c55e;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  background: linear-gradient(180deg, #081023 0%, #050913 100%);
  color:var(--text);
}

/* Login */
.login-body{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.login-container{ width:100%; max-width:420px; }
.login-box{
  background: rgba(15,23,42,.85);
  border:1px solid var(--border);
  border-radius:14px;
  padding:22px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}
.login-header{ text-align:center; margin-bottom:18px; }
.login-header i{ font-size:34px; color:var(--primary); margin-bottom:10px; }
.login-header h2{ margin:0 0 6px; font-size:20px; }
.login-header p{ margin:0; color:var(--muted); font-size:13px; }

.input-group{ margin:14px 0; }
label{ display:block; margin:0 0 8px; color:var(--muted); font-size:13px; }
input{
  width:100%;
  padding:12px 12px;
  border-radius:10px;
  border:1px solid var(--border);
  background: rgba(2,6,23,.4);
  color:var(--text);
  outline:none;
}
input:focus{ border-color: rgba(37,99,235,.7); }

.btn-login{
  width:100%;
  margin-top:10px;
  padding:12px 14px;
  border-radius:10px;
  border:none;
  cursor:pointer;
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  color:white;
  font-weight:700;
}
.btn-login i{ margin-right:8px; }

.login-error{
  margin-top:12px;
  padding:10px 12px;
  border-radius:10px;
  background: rgba(239,68,68,.12);
  border:1px solid rgba(239,68,68,.35);
  color: #fecaca;
}

/* App layout */
.app-layout{ display:flex; min-height:100vh; }
.sidebar{
  width:270px;
  background: rgba(15,23,42,.95);
  border-right:1px solid var(--border);
  padding:18px;
  position:relative;
}
.sidebar-header{ margin-bottom:14px; }
.sidebar-header i{ color:var(--primary); font-size:22px; }
.sidebar-header h3{ margin:8px 0 4px; font-size:16px; }
.sidebar-header p{ margin:0; color:var(--muted); font-size:12px; }

.sidebar-menu{ display:flex; flex-direction:column; gap:6px; margin-top:12px; }
.menu-item{
  color:var(--text);
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid transparent;
}
.menu-item:hover{ background: rgba(37,99,235,.12); border-color: rgba(37,99,235,.35); }
.menu-item.active{ background: rgba(37,99,235,.18); border-color: rgba(37,99,235,.45); }

.sidebar-footer{
  position:absolute;
  left:18px;
  right:18px;
  bottom:18px;
}
.user-info{ display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.user-info i{ color:var(--primary); }
.name{ font-weight:800; }
.role{ font-size:12px; color:var(--muted); }

.btn-logout{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid rgba(239,68,68,.35);
  background: rgba(239,68,68,.10);
  color:#fecaca;
  cursor:pointer;
  font-weight:700;
}
.btn-logout i{ margin-right:8px; }

.sidebar-toggle{
  position:fixed;
  top:16px;
  left:16px;
  z-index:10;
  display:none;
  background: rgba(15,23,42,.95);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}

.sidebar-overlay{ display:none; }

.main-content{
  flex:1;
  padding:88px 24px 40px;
}

.card{
  background: rgba(15,23,42,.85);
  border:1px solid var(--border);
  border-radius:14px;
  padding:18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}

.table-wrap{ overflow:auto; margin-top:14px; }

table{ width:100%; border-collapse:collapse; }
th,td{ padding:10px; border-bottom:1px solid rgba(255,255,255,.06); text-align:left; }
th{ color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.02em; }

.btn{
  padding:9px 12px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}
.btn.primary{ border-color: rgba(37,99,235,.4); background: rgba(37,99,235,.14); }
.btn.danger{ border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.14); color:#fecaca; }

/* Modal */
.modal-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:100;
}
.modal{
  width: min(920px, 100%);
  background: rgba(15,23,42,.98);
  border:1px solid var(--border);
  border-radius:14px;
}
.modal-header{
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.modal-header h3{ margin:0; font-size:15px; }
.modal-close{
  background: transparent;
  border:none;
  color:var(--text);
  font-size:22px;
  cursor:pointer;
}
.modal-body{ padding:16px; }
.modal-footer{ padding:14px 16px; border-top:1px solid rgba(255,255,255,.06); display:flex; justify-content:flex-end; gap:10px; }

/* Footer */
.app-footer{
  position:fixed;
  left:270px;
  right:0;
  bottom:0;
  padding:10px 20px;
  background: rgba(2,6,23,.55);
  border-top:1px solid rgba(255,255,255,.06);
  display:flex;
  justify-content:space-between;
  z-index:5;
}
.footer-user{ color:var(--muted); font-size:12px; }

@media (max-width: 900px){
  .sidebar{ position:fixed; left:-300px; top:0; bottom:0; z-index:50; transition:.2s; }
  .sidebar.open{ left:0; }
  .sidebar-overlay{ display:block; position:fixed; inset:0; background: rgba(0,0,0,.45); z-index:40; opacity:0; pointer-events:none; transition:.2s; }
  .sidebar-overlay.show{ opacity:1; pointer-events:auto; }
  .sidebar-toggle{ display:block; }
  .main-content{ padding-top:80px; }
  .app-footer{ left:0; }
}

