/* Hilal ERP — Light (White/Blue/Green) */
:root{
  --bg:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --card:#ffffff;
  --border:#e5e7eb;
  --primary:#1d4ed8;      /* blue */
  --primary-weak:#eff6ff;
  --success:#16a34a;      /* green */
  --success-weak:#ecfdf5;
  --sidebar:#ffffff;      /* light sidebar */
  --sidebar-text:#0f172a;
  --sidebar-muted:#64748b;
  --sidebar-border:#e5e7eb;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu;
  background:var(--bg);
  color:var(--text);
}
a{color:var(--primary);text-decoration:none}
.btn{
  padding:10px 14px;border-radius:10px;border:1px solid var(--border);
  background:var(--primary);color:#fff;cursor:pointer
}
.btn.ghost{background:#fff;color:var(--primary)}
.badge{display:inline-block;padding:4px 10px;border:1px solid var(--border);border-radius:999px;font-size:12px;color:var(--muted);background:#fff}
.muted{color:var(--muted)}

input,select{
  width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--border);
  background:#fff;color:var(--text)
}
label{display:block;margin:8px 0 6px;color:var(--muted)}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:18px;
  box-shadow:0 6px 20px rgba(2,8,23,.04);
}
.grid{display:grid;gap:16px}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}

/* Tables */
table{width:100%;border-collapse:separate;border-spacing:0 6px}
th{font-weight:600;color:#334155;text-align:start;padding:10px 12px}
td{background:#fff;border:1px solid var(--border);border-left:none;border-right:none;padding:10px 12px}
tr:first-child td{border-top-left-radius:10px;border-top-right-radius:10px}
tr:last-child td{border-bottom-left-radius:10px;border-bottom-right-radius:10px}

/* Layout: sidebar + content */
.layout{display:flex;min-height:100vh}

.sidebar{
  width:260px;flex:0 0 260px;background:var(--sidebar);color:var(--sidebar-text);
  display:flex;flex-direction:column;position:sticky;top:0;height:100vh;border-inline-end:1px solid var(--sidebar-border)
}
.brand{display:flex;align-items:center;gap:10px;padding:18px 16px;border-bottom:1px solid var(--sidebar-border)}
.brand .logo{width:34px;height:34px;border-radius:8px;background:linear-gradient(145deg,var(--primary),#60a5fa)}
.brand .title{font-weight:700}
.nav{display:flex;flex-direction:column;padding:12px}
.nav a{
  padding:10px 12px;border-radius:10px;color:var(--sidebar-text);
  border:1px solid transparent;margin-bottom:6px
}
.nav a:hover{background:var(--primary-weak)}
.nav a.active{background:var(--primary-weak);border-color:#bfdbfe}
.nav a .tag{margin-inline-start:auto;font-size:10px;color:#065f46;background:var(--success-weak);border:1px solid #bbf7d0;border-radius:999px;padding:1px 6px}

.sidebar-footer{margin-top:auto;padding:12px;display:flex;gap:8px;flex-wrap:wrap}
.sidebar .chip{display:inline-block;padding:6px 8px;border-radius:8px;border:1px solid var(--sidebar-border);color:var(--sidebar-muted)}

.content{flex:1;min-width:0;padding:24px}

/* Topbar minimal */
.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.hamburger{display:none}
@media (max-width: 960px){
  .sidebar{position:fixed;left:-280px;top:0;z-index:20;height:100vh;transition:left .2s ease}
  .sidebar.open{left:0}
  .content{padding:16px}
  .hamburger{display:inline-flex;align-items:center;gap:8px}
  .backdrop{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none}
  .backdrop.show{display:block}
}

/* Utility chips */
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chips .chip{padding:6px 10px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--muted)}

/* RTL */
.rtl{direction:rtl}
.rtl th, .rtl td{text-align:start}
