/* ============================================
   STIL SAVDO CRM — DIZAYN
   GitHub-light · Yashil · Glass effekt
   ============================================ */

:root {
  /* Asosiy fon va glass */
  --bg: #e9efec;
  --glass: rgba(255, 255, 255, 0.72);
  --glass-strong: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.65);
  --hairline: rgba(27, 31, 36, 0.10);
  --hairline-soft: rgba(27, 31, 36, 0.06);

  /* GitHub-uslub matn ranglari */
  --text: #1f2328;
  --muted: #636c76;
  --muted-soft: #8c959f;

  /* Yashil identifikatsiya (GitHub green) */
  --primary: #1f883d;
  --primary-hover: #1a7f37;
  --primary-emph: #116329;
  --primary-soft: #dafbe1;
  --primary-tint: rgba(31, 136, 61, 0.10);
  --accent-grad: linear-gradient(135deg, #2da44e 0%, #1f883d 60%, #116329 100%);

  /* Semantik */
  --success: #1f883d;
  --success-soft: #dafbe1;
  --warn: #9a6700;
  --warn-soft: #fff8c5;
  --danger: #cf222e;
  --danger-soft: #ffebe9;
  --info: #0969da;
  --info-soft: #ddf4ff;

  --border: #d0d7de;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 0 rgba(27,31,36,.03), 0 1px 3px rgba(27,31,36,.06);
  --shadow-glass: 0 8px 30px rgba(31,45,40,.10), 0 2px 8px rgba(31,45,40,.05);
  --shadow-lift: 0 14px 40px rgba(31,45,40,.14);
  --sidebar-w: 256px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  position: relative;
  min-height: 100vh;
}

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

/* ---------- Ambient fon (glass uchun rang beradi) ---------- */
.ambient {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 8% -5%, rgba(45,164,78,0.16), transparent 60%),
    radial-gradient(1000px 700px at 100% 0%, rgba(13,148,136,0.12), transparent 55%),
    radial-gradient(900px 800px at 50% 120%, rgba(31,136,61,0.10), transparent 60%),
    var(--bg);
}
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.blob-1 { width: 420px; height: 420px; top: -120px; left: -80px; background: #58d68d; }
.blob-2 { width: 380px; height: 380px; top: 30%; right: -120px; background: #2dd4bf; opacity: .35; }
.blob-3 { width: 460px; height: 460px; bottom: -160px; left: 35%; background: #34d399; opacity: .3; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-right: 1px solid var(--glass-border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  box-shadow: 1px 0 0 var(--hairline-soft);
}

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

/* ---------- Brand ---------- */
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px; border-bottom: 1px solid var(--hairline-soft);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 11px;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 19px; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(31,136,61,.35);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; color: var(--text); font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--muted-soft); letter-spacing: .03em; }

/* ---------- Nav ---------- */
.nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; }
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; font-size: 14px;
  transition: all .15s; position: relative;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-link:hover { background: rgba(31,136,61,.07); color: var(--text); }
.nav-link.active {
  background: var(--primary-soft); color: var(--primary-emph); font-weight: 600;
}
.nav-link.active svg { opacity: 1; color: var(--primary); }
.nav-link.active::before {
  content: ''; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px; background: var(--primary); border-radius: 0 3px 3px 0;
}

/* ---------- Sidebar footer ---------- */
.sidebar-foot { padding: 12px; border-top: 1px solid var(--hairline-soft); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 12px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; box-shadow: 0 2px 8px rgba(31,136,61,.3);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.3; }
.user-name { color: var(--text); font-weight: 600; font-size: 13px; }
.user-role { color: var(--muted-soft); font-size: 11px; }
.logout-form { width: 100%; }
.logout-btn {
  width: 100%; padding: 9px; border: 1px solid var(--border);
  background: var(--glass-strong); color: var(--muted); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit;
}
.logout-btn:hover { background: var(--danger-soft); color: var(--danger); border-color: #ffc1c1; }

/* ---------- Topbar ---------- */
.topbar {
  height: 64px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  display: flex; align-items: center; gap: 16px; padding: 0 28px;
  position: sticky; top: 0; z-index: 30;
  box-shadow: 0 1px 0 var(--hairline-soft);
}
.page-title { font-size: 18px; font-weight: 700; color: var(--text); }
.topbar-right { margin-left: auto; }
.topbar-date {
  color: var(--muted); font-size: 13px; font-weight: 500;
  padding: 6px 12px; background: var(--glass-strong); border: 1px solid var(--hairline);
  border-radius: 20px;
}
.menu-toggle { display: none; background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text); }

/* ---------- Content ---------- */
.content { padding: 28px; flex: 1; max-width: 1320px; width: 100%; }

/* ---------- Glass card base ---------- */
.card, .stat-card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-glass);
}
.card { margin-bottom: 22px; overflow: hidden; }

/* ---------- Welcome banner ---------- */
.welcome {
  position: relative; overflow: hidden;
  border-radius: var(--radius); padding: 26px 28px; margin-bottom: 22px;
  background: var(--accent-grad); color: #fff;
  box-shadow: 0 12px 34px rgba(31,136,61,.30);
}
.welcome::after {
  content: ''; position: absolute; right: -40px; top: -60px;
  width: 240px; height: 240px; border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.welcome::before {
  content: ''; position: absolute; right: 80px; bottom: -90px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,.08);
}
.welcome-content { position: relative; z-index: 2; }
.welcome h1 { font-size: 22px; font-weight: 800; margin-bottom: 4px; letter-spacing: -.01em; }
.welcome p { font-size: 14px; opacity: .9; }
.welcome-chips { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.welcome-chip {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25);
  padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.welcome-chip strong { font-weight: 800; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card { padding: 20px; transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
}
.stat-icon svg { width: 21px; height: 21px; }
.stat-icon.green { background: var(--primary-soft); color: var(--primary); }
.stat-icon.blue { background: var(--info-soft); color: var(--info); }
.stat-icon.amber { background: var(--warn-soft); color: var(--warn); }
.stat-icon.teal { background: #d3f3ef; color: #0d9488; }
.stat-trend { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.stat-trend.up { background: var(--primary-soft); color: var(--primary-emph); }
.stat-trend.flat { background: var(--hairline-soft); color: var(--muted); }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-value { font-size: 25px; font-weight: 800; color: var(--text); letter-spacing: -.02em; margin-top: 3px; }
.stat-unit { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat-foot { margin-top: 6px; font-size: 12px; color: var(--muted-soft); }
.stat-foot.warn { color: var(--warn); font-weight: 600; }

/* ---------- Cards head/body ---------- */
.card-head { display: flex; align-items: center; gap: 12px; padding: 17px 22px; border-bottom: 1px solid var(--hairline-soft); }
.card-head h2 { font-size: 15px; font-weight: 700; color: var(--text); }
.card-sub { color: var(--muted-soft); font-size: 12px; margin-left: auto; }
.card-link { color: var(--primary); font-size: 13px; font-weight: 600; margin-left: auto; }
.card-link:hover { text-decoration: underline; }
.card-body { padding: 22px; }
.card-body.no-pad { padding: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-wide { display: grid; grid-template-columns: 1.6fr 1fr; gap: 22px; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table thead th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em; padding: 12px 22px;
  border-bottom: 1px solid var(--hairline-soft); background: rgba(255,255,255,.35);
}
.table tbody td { padding: 14px 22px; border-bottom: 1px solid var(--hairline-soft); font-size: 14px; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: rgba(31,136,61,.04); }
.table .strong, .table .row-actions { white-space: nowrap; }
.strong { font-weight: 600; color: var(--text); }
.muted { color: var(--muted); }
.table tfoot td { padding: 14px 22px; border-top: 2px solid var(--hairline); }
.tfoot-label { text-align: right; font-weight: 600; color: var(--muted); }
.tfoot-total { font-weight: 800; color: var(--text); font-size: 15px; }

.row-actions { display: flex; gap: 14px; align-items: center; }
.action-edit { color: var(--primary); font-weight: 600; font-size: 13px; }
.action-delete { background: none; border: none; color: var(--danger); font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; padding: 0; }
.action-delete:hover, .action-edit:hover { text-decoration: underline; }

/* ---------- Badges & tags ---------- */
.badge { display: inline-block; padding: 4px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: capitalize; border: 1px solid transparent; }
.badge-yangi { background: var(--info-soft); color: var(--info); border-color: rgba(9,105,218,.2); }
.badge-to\02019langan { background: var(--warn-soft); color: var(--warn); border-color: rgba(154,103,0,.2); }
.badge-yetkazilgan { background: var(--success-soft); color: var(--primary-emph); border-color: rgba(31,136,61,.2); }
.badge-bekor { background: var(--danger-soft); color: var(--danger); border-color: rgba(207,34,46,.2); }

.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-oddiy { background: var(--hairline-soft); color: var(--muted); }
.tag-doimiy { background: var(--info-soft); color: var(--info); }
.tag-VIP { background: var(--warn-soft); color: var(--warn); }

/* ---------- Rank list (with bars) ---------- */
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.rank-item { display: flex; flex-direction: column; gap: 6px; }
.rank-row { display: flex; align-items: center; gap: 12px; }
.rank-num {
  width: 24px; height: 24px; border-radius: 7px; background: var(--primary-soft);
  color: var(--primary-emph); font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.rank-name { flex: 1; font-weight: 500; color: var(--text); font-size: 14px; }
.rank-value { color: var(--muted); font-size: 13px; font-weight: 600; }
.rank-bar { height: 6px; border-radius: 6px; background: var(--hairline-soft); overflow: hidden; }
.rank-bar span { display: block; height: 100%; background: var(--accent-grad); border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; font-family: inherit;
  transition: all .15s; white-space: nowrap;
}
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(31,136,61,.28); border-color: var(--primary-emph); }
.btn-primary:hover { background: var(--primary-hover); box-shadow: 0 4px 14px rgba(31,136,61,.36); }
.btn-light { background: var(--glass-strong); color: var(--text); border-color: var(--border); }
.btn-light:hover { background: #fff; border-color: var(--muted-soft); }
.btn-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover { background: var(--glass-strong); color: var(--text); }
.btn-danger-ghost { background: var(--glass-strong); color: var(--danger); border-color: var(--border); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: #ffc1c1; }

/* ---------- Page actions / search ---------- */
.page-actions { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.search-form { display: flex; gap: 8px; flex: 1; min-width: 280px; }
.search-form input, .search-form select {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: var(--glass-strong);
}
.search-form input { flex: 1; }
.search-form input:focus, .search-form select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.page-actions .btn-primary { margin-left: auto; }

/* ---------- Filter tabs ---------- */
.filter-tabs { display: flex; gap: 4px; background: var(--glass-strong); padding: 4px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); }
.filter-tab { padding: 8px 16px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: capitalize; }
.filter-tab:hover { background: rgba(31,136,61,.07); }
.filter-tab.active { background: var(--primary); color: #fff; }

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card {
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-glass);
  transition: box-shadow .2s, transform .2s;
}
.product-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.product-img { position: relative; height: 180px; background: rgba(255,255,255,.4); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-img img { width: 100%; height: 100%; object-fit: cover; }
.product-img.no-img, .img-placeholder { color: var(--muted-soft); }
.img-placeholder svg { width: 48px; height: 48px; }
.stock-flag { position: absolute; top: 10px; left: 10px; background: var(--danger); color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; box-shadow: 0 2px 8px rgba(207,34,46,.3); }
.product-info { padding: 16px; }
.product-cat { font-size: 11px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.product-name { font-weight: 700; color: var(--text); margin: 4px 0 10px; font-size: 15px; }
.product-meta { display: flex; gap: 6px; margin-bottom: 12px; }
.chip { background: var(--hairline-soft); color: var(--muted); padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.product-bottom { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--hairline-soft); }
.product-price { font-weight: 800; color: var(--text); font-size: 15px; }
.product-stock { font-size: 13px; color: var(--success); font-weight: 600; }
.product-stock.low { color: var(--danger); }
.product-actions { display: flex; gap: 8px; }
.product-actions .btn, .product-actions form { flex: 1; }
.product-actions form .btn { width: 100%; }

/* ---------- Forms ---------- */
.form-wrap { max-width: 640px; }
.form-wrap-wide { max-width: 820px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text); }
.field em { color: var(--danger); font-style: normal; }
.field input, .field select, .field textarea {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: var(--glass-strong); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.field-hint { font-size: 12px; color: var(--muted-soft); }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; padding-top: 8px; }

/* ---------- File upload (rasm) ---------- */
.upload-zone {
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 22px;
  display: flex; align-items: center; gap: 18px; background: rgba(255,255,255,.35);
  transition: border-color .15s, background .15s; cursor: pointer;
}
.upload-zone:hover { border-color: var(--primary); background: var(--primary-tint); }
.upload-preview {
  width: 88px; height: 88px; border-radius: 11px; flex-shrink: 0; overflow: hidden;
  background: var(--hairline-soft); display: flex; align-items: center; justify-content: center;
  color: var(--muted-soft); border: 1px solid var(--hairline);
}
.upload-preview img { width: 100%; height: 100%; object-fit: cover; }
.upload-preview svg { width: 32px; height: 32px; }
.upload-text { flex: 1; }
.upload-text strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 3px; }
.upload-text span { font-size: 12px; color: var(--muted-soft); }
.upload-zone input[type="file"] { display: none; }

/* ---------- Order form items ---------- */
.items-head { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.items-head h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.item-row { display: grid; grid-template-columns: 1fr 90px 130px 36px; gap: 10px; align-items: center; margin-bottom: 10px; }
.item-row select, .item-row input { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; background: var(--glass-strong); }
.item-sub { font-size: 13px; font-weight: 600; color: var(--muted); text-align: right; }
.item-remove { width: 36px; height: 36px; border: 1px solid var(--border); background: var(--glass-strong); border-radius: var(--radius-sm); color: var(--danger); cursor: pointer; font-size: 14px; }
.item-remove:hover { background: var(--danger-soft); }
.order-total { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; background: var(--primary-soft); border: 1px solid rgba(31,136,61,.2); border-radius: var(--radius); margin-top: 8px; }
.order-total span { font-weight: 600; color: var(--text); }
.order-total strong { font-size: 20px; font-weight: 800; color: var(--primary-emph); }

/* ---------- Order detail ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.side-col { display: flex; flex-direction: column; gap: 16px; }
.side-col .card { margin-bottom: 0; }
.info-line { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 14px; }
.info-line:last-child { border-bottom: none; }
.info-line span { color: var(--muted); }

/* ---------- Alerts ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; margin-bottom: 18px; border: 1px solid transparent; }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: rgba(207,34,46,.2); }
.alert-success { background: var(--success-soft); color: var(--primary-emph); border-color: rgba(31,136,61,.2); }
.alert-warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(154,103,0,.2); }

/* ---------- Empty state ---------- */
.empty { padding: 48px 22px; text-align: center; color: var(--muted-soft); font-size: 14px; }
.empty a { color: var(--primary); font-weight: 600; }

/* ---------- Mini list (low stock on dashboard) ---------- */
.mini-list { list-style: none; display: flex; flex-direction: column; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--hairline-soft); font-size: 14px; }
.mini-list li:last-child { border-bottom: none; }
.mini-list .ml-name { font-weight: 500; color: var(--text); }
.mini-list .ml-meta { color: var(--muted-soft); font-size: 12px; margin-left: 8px; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  padding: 20px; position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(45,164,78,.35), transparent 55%),
    radial-gradient(800px 600px at 90% 90%, rgba(13,148,136,.30), transparent 55%),
    linear-gradient(135deg, #0d2818 0%, #114a2c 50%, #0a3d23 100%);
}
.login-wrap { width: 100%; max-width: 400px; position: relative; z-index: 2; }
.login-card {
  background: rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 18px; padding: 40px 36px;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-mark { width: 58px; height: 58px; font-size: 27px; border-radius: 15px; margin: 0 auto 16px; }
.login-brand h1 { font-size: 22px; font-weight: 800; color: var(--text); }
.login-brand p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form label { display: flex; flex-direction: column; gap: 7px; }
.login-form label span { font-size: 13px; font-weight: 600; color: var(--text); }
.login-form input { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: #fff; }
.login-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.login-foot { text-align: center; color: var(--muted-soft); font-size: 12px; margin-top: 20px; }
.login-copyright { text-align: center; color: rgba(255,255,255,.65); font-size: 12px; margin-top: 20px; position: relative; z-index: 2; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .grid-wide { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .main { margin-left: 0; }
  .menu-toggle { display: block; }
  .content { padding: 18px; }
  .topbar { padding: 0 18px; }
  .stat-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .search-form { min-width: 100%; flex-wrap: wrap; }
  .page-actions .btn-primary { margin-left: 0; width: 100%; }
  .item-row { grid-template-columns: 1fr 70px 36px; }
  .item-row .item-sub { display: none; }
  .welcome h1 { font-size: 19px; }
}
