:root{--sidebar:245px;--border:#e2e8f0;--muted:#64748b;--text:#0f172a;--primary:#2563eb;--bg:#f8fafc}
*{box-sizing:border-box}html,body{margin:0;padding:0;min-height:100%;font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;color:var(--text);background:var(--bg)}
#app{min-height:100vh;display:flex!important;align-items:stretch}
.sidebar{position:fixed;left:0;top:0;bottom:0;width:var(--sidebar);padding:24px 16px!important;background:#fff;border-right:1px solid var(--border);overflow-y:auto;z-index:1000}
.sidebar .brand{font-size:22px;font-weight:800;letter-spacing:.2px;padding:0 10px 18px;margin-bottom:10px!important;border-bottom:1px solid var(--border)}
.sidebar a{display:block;color:#334155;text-decoration:none;padding:9px 10px;border-radius:8px;font-size:14px;line-height:1.25;margin:2px 0}
.sidebar a:hover{background:#eff6ff;color:#1d4ed8}.sidebar a.active{background:#dbeafe;color:#1d4ed8;font-weight:700}
.sidebar .menu-title{font-size:11px;font-weight:800;color:#94a3b8;letter-spacing:.12em;margin:20px 10px 6px}
#app>main, body > .d-flex > main{margin-left:var(--sidebar);width:calc(100% - var(--sidebar));flex:0 0 calc(100% - var(--sidebar));max-width:calc(100% - var(--sidebar));min-width:0;min-height:100vh}
.navbar{height:68px;position:sticky;top:0;z-index:900;background:#fff!important;padding:0 28px!important;border-bottom:1px solid var(--border)!important}
.navbar .fw-semibold{font-size:18px}.navbar .btn{border-radius:7px}
.container-fluid{padding:28px!important;max-width:1600px;margin:0 auto}
.card{border:1px solid var(--border)!important;border-radius:14px!important;box-shadow:0 2px 10px rgba(15,23,42,.04)!important;background:#fff}
.stat-card{padding:18px 20px;min-height:112px}.stat-card .text-muted{font-size:13px;color:var(--muted)!important}.stat-card .fs-3{margin-top:5px;font-size:27px!important}
.alert{border-radius:10px}.table{margin-bottom:0}.btn{border-radius:7px}
@media(max-width:900px){:root{--sidebar:210px}.sidebar{width:var(--sidebar)}#app>main, body > .d-flex > main{margin-left:var(--sidebar);width:calc(100% - var(--sidebar));flex-basis:calc(100% - var(--sidebar));max-width:calc(100% - var(--sidebar))}.container-fluid{padding:18px!important}}
@media(max-width:640px){:root{--sidebar:0px}.sidebar{position:relative;width:100%;height:auto;border-right:0;border-bottom:1px solid var(--border)}#app{display:block!important}#app>main, body > .d-flex > main{margin-left:0;width:100%;max-width:100%;flex:0 0 100%}.navbar{position:relative}.container-fluid{padding:14px!important}}
.welcome-card h5{font-size:20px;font-weight:700;margin-bottom:8px}.welcome-card p{font-size:14px}

.store-dashboard-card{padding:0;overflow:hidden}.store-dashboard-main{display:flex;align-items:center;gap:18px;padding:22px 24px;background:linear-gradient(135deg,#ffffff,#f8fbff)}.store-icon{width:52px;height:52px;display:flex;align-items:center;justify-content:center;border-radius:14px;background:#eff6ff;font-size:28px;flex:0 0 52px}.store-label{font-size:11px;font-weight:800;letter-spacing:.12em;color:#94a3b8;margin-bottom:2px}.store-name{font-size:25px;font-weight:800;color:#0f172a}.store-detail{font-size:13px;color:#64748b;margin-top:3px}.store-edit{margin-left:auto;white-space:nowrap}@media(max-width:640px){.store-dashboard-main{align-items:flex-start;flex-wrap:wrap}.store-edit{margin-left:70px}}

/* Stock Opname layout */
.stock-opname-page .page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:22px}
.stock-opname-page .page-head h2{font-size:28px;font-weight:800;margin:0 0 5px}
.stock-opname-page .filter-card{padding:20px}
.stock-opname-page .section-title{font-size:16px;font-weight:700;margin:0 0 16px}
.stock-opname-page .table-card{padding:20px}
.stock-opname-page .table thead th{font-size:13px;font-weight:700;color:#475569;background:#f8fafc;white-space:nowrap}
.stock-opname-page .table td{font-size:14px}
@media(max-width:640px){.stock-opname-page .page-head{flex-direction:column}.stock-opname-page .page-head .btn{width:100%}}

/* Login page - isolated so it cannot affect dashboard/app layout */
body.login-page{
  min-height:100vh;
  margin:0;
  padding:24px 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8fafc;
}
body.login-page .login-card{
  width:100%;
  max-width:420px;
  margin:0 auto;
  padding:32px;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:16px;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
}
body.login-page .login-card h3{
  margin:0 0 6px;
  font-size:30px;
  font-weight:800;
  color:#0f172a;
}
body.login-page .login-card > p{
  margin:0 0 28px;
}
body.login-page .login-card .form-label{
  display:block;
  margin-bottom:7px;
  font-size:14px;
  font-weight:600;
  color:#334155;
}
body.login-page .login-card .form-control{
  width:100%;
  min-height:44px;
  margin-bottom:18px!important;
  padding:10px 12px;
  border:1px solid #cbd5e1;
  border-radius:8px;
  background:#fff;
  box-shadow:none;
}
body.login-page .login-card .form-control:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,.12);
}
body.login-page .login-card .mb-4{
  margin-bottom:22px!important;
}
body.login-page .login-card .btn{
  width:100%;
  min-height:44px;
  border-radius:8px;
  font-weight:600;
}
body.login-page .login-card .alert{
  margin-bottom:20px;
}
@media(max-width:480px){
  body.login-page{padding:16px;}
  body.login-page .login-card{padding:24px 20px;}
  body.login-page .login-card h3{font-size:26px;}
}
