* { box-sizing: border-box; }

:root {
  --body-bg: #f2f4fa; --body-text: #1a2036;
  --topbar-bg: #ffffff; --topbar-border: #e6e9f3;
  --card-bg: #ffffff; --card-border: rgba(15, 31, 61, 0.06);
  --card-shadow: 0 1px 2px rgba(15, 31, 61, 0.04), 0 10px 24px -12px rgba(15, 31, 61, 0.14);
  --card-shadow-hover: 0 6px 14px rgba(15, 31, 61, 0.08), 0 22px 40px -14px rgba(15, 31, 61, 0.24);
  --muted: #667085; --border: #e6e9f3; --row-border: #edf0f7;
  --primary: #1d3a7a; --primary-dark: #142a5c; --primary-light: #2f56ab; --primary-text: #fff;
  --primary-glow: rgba(29, 58, 122, 0.16);
  --primary-gradient: linear-gradient(135deg, #1d3a7a 0%, #3563e0 100%);
  --accent: #06b6d4; --accent-2: #7c3aed;
  --badge-bg: #e8edfc; --badge-text: #1d3a7a;
  --input-bg: #fff; --input-border: #d3d9ea;
  --link: #1d3a7a;
  --chip-bg: #eef1f8;
  --theme-toggle-bg: #eef1f8; --theme-toggle-text: #1d3a7a;
  --scrollbar-thumb: #c7cee3;
  --radius-lg: 16px; --radius-md: 11px; --radius-sm: 7px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}
html[data-theme="dark"] {
  --body-bg: #0a1120; --body-text: #e6eaf5;
  --topbar-bg: #101a30; --topbar-border: #1e2b48;
  --card-bg: #121d34; --card-border: rgba(255, 255, 255, 0.06);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 28px -12px rgba(0, 0, 0, 0.55);
  --card-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.4), 0 26px 46px -14px rgba(0, 0, 0, 0.7);
  --muted: #8a97b8; --border: #1e2b48; --row-border: #19243d;
  --primary: #4c7dff; --primary-dark: #3563e0; --primary-light: #6f97ff; --primary-text: #fff;
  --primary-glow: rgba(76, 125, 255, 0.22);
  --primary-gradient: linear-gradient(135deg, #4c7dff 0%, #7c9dff 100%);
  --accent: #22d3ee; --accent-2: #a78bfa;
  --badge-bg: #1c2f5c; --badge-text: #9db8ff;
  --input-bg: #16223c; --input-border: #2a3a5c;
  --link: #9db8ff;
  --chip-bg: #16223c;
  --theme-toggle-bg: #16223c; --theme-toggle-text: #9db8ff;
  --scrollbar-thumb: #2a3a5c;
}

body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--body-bg); color: var(--body-text); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -0.01em; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

a { transition: color 0.15s var(--ease); }

button, .btn {
  font-family: inherit; cursor: pointer;
  transition: filter 0.15s var(--ease), transform 0.08s var(--ease), box-shadow 0.15s var(--ease), background 0.15s var(--ease), opacity 0.15s var(--ease);
}
button:hover, .btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:active, .btn:active { transform: translateY(1px) scale(0.98); }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary-light); outline-offset: 2px;
}
button:disabled { filter: none; cursor: not-allowed; opacity: 0.6; transform: none !important; }

input, select, textarea { transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary-light) !important; box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ---- Jonli animatsiyalar — sahifani "qimirlab turadigan", zamonaviy his
   qildirish uchun. Harakatga sezgir foydalanuvchilar uchun (brauzer/OS
   darajasida "kamroq harakat" so'ralgan bo'lsa) butunlay o'chiriladi. ---- */
@keyframes jrFadeSlideUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes jrSoftPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.35); } 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); } }
@keyframes jrGentleFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes jrShineSweep { 0% { transform: translateX(-130%) skewX(-15deg); } 35%, 100% { transform: translateX(230%) skewX(-15deg); } }
@keyframes jrFlashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes jrGreenPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.5); } 50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); } }

@media (prefers-reduced-motion: no-preference) {
  .card, .stat-card { animation: jrFadeSlideUp 0.45s var(--ease) both; }
  .card-grid > *:nth-child(1), .stat-grid > *:nth-child(1) { animation-delay: 0.02s; }
  .card-grid > *:nth-child(2), .stat-grid > *:nth-child(2) { animation-delay: 0.07s; }
  .card-grid > *:nth-child(3), .stat-grid > *:nth-child(3) { animation-delay: 0.12s; }
  .card-grid > *:nth-child(4), .stat-grid > *:nth-child(4) { animation-delay: 0.17s; }
  .card-grid > *:nth-child(5), .stat-grid > *:nth-child(5) { animation-delay: 0.22s; }
  .card-grid > *:nth-child(6), .stat-grid > *:nth-child(6) { animation-delay: 0.27s; }

  .badge-red { animation: jrSoftPulse 2.4s ease-in-out infinite; }
  .sidebar .brand-logo { animation: jrGentleFloat 4.5s ease-in-out infinite; }
  .flash { animation: jrFlashIn 0.3s var(--ease) both; }

  .sidebar-support { position: relative; overflow: hidden; }
  .sidebar-support::after {
    content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: jrShineSweep 3.2s ease-in-out infinite; animation-delay: 1s;
  }
}

.stat-card { transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease); }
.sidebar .nav-link { position: relative; }
.sidebar .nav-link::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0;
  background: var(--primary-light); border-radius: 0 3px 3px 0; transform: translateY(-50%);
  transition: height 0.18s var(--ease);
}
.sidebar .nav-link:hover::before, .sidebar .nav-link.active::before { height: 60%; }

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; background: linear-gradient(180deg, #14264d 0%, #0f1f3d 45%, #0b1730 100%); color: #cfd8ef; flex-shrink: 0; padding: 20px 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
  transition: width 0.18s var(--ease), padding 0.18s var(--ease);
  display: flex; flex-direction: column;
}
html.sidebar-collapsed .sidebar { width: 0; padding: 0; overflow: hidden; box-shadow: none; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: #fff; padding: 0 20px 22px; letter-spacing: -0.01em; }
.sidebar .brand-logo { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; border-radius: 8px; }
.sidebar-toggle {
  background: none; border: none; color: #cfd8ef; font-size: 26px; cursor: pointer; padding: 4px 6px; border-radius: 6px; flex-shrink: 0; margin-left: -12px;
}
.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.08); }
.sidebar-reopen {
  display: none; position: fixed; top: 16px; left: 16px; z-index: 500;
  width: 38px; height: 38px; border-radius: 8px; border: none; background: var(--primary); color: var(--primary-text);
  font-size: 18px; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
}
html.sidebar-collapsed .sidebar-reopen { display: block; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.sidebar .nav-link {
  color: #b7c2e0; text-decoration: none; padding: 11px 14px; font-size: 13.5px; font-weight: 500;
  border-radius: 8px; transition: background 0.15s var(--ease), color 0.15s var(--ease), transform 0.1s var(--ease);
}
.sidebar .nav-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; transform: translateX(2px); }
.sidebar .nav-link.active { background: var(--primary-gradient); color: #fff; box-shadow: 0 4px 12px rgba(29, 58, 122, 0.45); }
.sidebar-support {
  margin: 8px 10px 4px; background: #229ED9; color: #fff !important; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 12px rgba(34, 158, 217, 0.35); flex-shrink: 0;
}
.sidebar-support:hover { background: #1c8bc0; transform: none !important; }
.sidebar-support-icon { flex-shrink: 0; }
html.sidebar-collapsed .sidebar-support { display: none; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 28px;
  background: var(--topbar-bg); border-bottom: 1px solid var(--topbar-border);
}
.topbar h1 { font-size: 19px; margin: 0; color: var(--body-text); font-weight: 700; }
.user-menu { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.user-menu select { padding: 5px 9px; border-radius: var(--radius-sm); border: 1px solid var(--input-border); background: var(--input-bg); color: var(--body-text); }
.user-menu .logout { color: #dc4444; text-decoration: none; font-weight: 600; }
.user-menu .logout:hover { color: #b91c1c; }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--input-border);
  background: var(--theme-toggle-bg); color: var(--theme-toggle-text); font-size: 16px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover { filter: brightness(1.1); transform: rotate(12deg); }

.content { padding: 26px 28px; min-width: 0; overflow-x: hidden; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 18px; }
.card {
  background: var(--card-bg); border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--card-shadow); border: 1px solid var(--card-border);
}
.card h3 { margin: 0 0 12px; font-size: 15px; color: var(--body-text); font-weight: 700; }
.chart-placeholder { height: 140px; border: 1px dashed var(--border); border-radius: var(--radius-md); }
.card canvas { max-width: 100%; }

.tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.tab-link { position: relative; padding: 10px 16px; text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 600; border-bottom: 2px solid transparent; transition: color 0.15s var(--ease); }
.tab-link::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px;
  background: var(--primary-gradient); transform: scaleX(0); transform-origin: center;
  transition: transform 0.2s var(--ease);
}
.tab-link:hover { color: var(--body-text); }
.tab-link.active { color: var(--primary); }
.tab-link.active::after { transform: scaleX(1); }
.muted { color: var(--muted); font-size: 14px; }

.flash-list { margin-bottom: 16px; }
.flash { padding: 11px 16px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 14px; border-left: 3px solid transparent; box-shadow: var(--card-shadow); }
.flash-warning { background: #fff4e0; color: #8a5a00; border-left-color: #d99a1f; }
.flash-danger { background: #fde3e3; color: #a11d1d; border-left-color: #dc4444; }
.flash-success { background: #e2f7e6; color: #1c7a34; border-left-color: #22a349; }

.login-body {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; margin: 0;
  background: radial-gradient(circle at 20% 20%, #16295a 0%, #0f1f3d 45%, #081428 100%);
}
.login-card {
  background: #fff; padding: 34px 32px; border-radius: var(--radius-lg); width: 320px;
  display: flex; flex-direction: column; gap: 11px;
  box-shadow: 0 20px 60px -18px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.15);
}
.login-logo { width: 84px; height: 84px; object-fit: contain; display: block; margin: 0 auto 8px; }
.login-card h1 { font-size: 18px; margin: 0 0 12px; text-align: center; font-weight: 700; }
.login-card input { padding: 11px; border-radius: var(--radius-sm); border: 1px solid #cbd2e6; font-size: 14px; }
.login-card button { margin-top: 8px; padding: 11px; border: none; border-radius: var(--radius-sm); background: var(--primary-gradient); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px -6px rgba(29, 58, 122, 0.55); }

.card-grid.three { grid-template-columns: repeat(3, 1fr); }

.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.inline-form input, .inline-form select { padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--input-border); background: var(--input-bg); color: var(--body-text); font-size: 13px; }
.inline-form button { padding: 8px 15px; border: none; border-radius: var(--radius-sm); background: var(--primary-gradient); color: var(--primary-text); font-weight: 600; font-size: 13px; box-shadow: 0 2px 6px rgba(29, 58, 122, 0.25); }

.simple-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.simple-table.full th, .simple-table.full td { text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--row-border); color: var(--body-text); }
.simple-table.full th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.03em; }
.simple-table.full tbody tr { transition: background 0.15s var(--ease); }
.simple-table.full tbody tr:hover { background: var(--row-border); }
.simple-table td { padding: 6px 4px; }

.row-actions button.danger { background: #fde3e3; color: #a11d1d; border: none; padding: 6px 12px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; }
.row-actions button.danger:hover { background: #fbcaca; }

.badge { background: var(--badge-bg); color: var(--badge-text); padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--chip-bg); color: var(--body-text); border-radius: 999px; padding: 3px 8px; font-size: 12px; margin: 2px 4px 2px 0; }
.chip-remove-form { display: inline; }
.chip-remove-form button { border: none; background: none; color: #a11d1d; font-size: 13px; line-height: 1; padding: 0; }
.chip-add-form { display: inline-flex; gap: 4px; margin-top: 6px; }
.chip-add-form select { padding: 3px 6px; border-radius: var(--radius-sm); border: 1px solid var(--input-border); background: var(--input-bg); color: var(--body-text); font-size: 12px; }
.chip-add-form button { border: none; background: var(--primary); color: var(--primary-text); border-radius: var(--radius-sm); padding: 3px 8px; font-size: 12px; }

.row-actions { display: flex; align-items: center; gap: 10px; }
.row-actions a { color: var(--link); text-decoration: none; font-size: 12px; font-weight: 600; }
.row-actions a:hover { text-decoration: underline; }
.checkbox-label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }

.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.detail-grid label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); margin-bottom: 4px; }
.detail-grid input, .detail-grid select { width: 100%; padding: 9px; border-radius: var(--radius-sm); border: 1px solid var(--input-border); background: var(--input-bg); color: var(--body-text); font-size: 13px; }
.detail-grid .readonly { padding: 8px 0; font-size: 14px; font-weight: 600; color: var(--body-text); }
.detail-grid-full { grid-column: 1 / -1; }
.detail-grid-full button { padding: 10px 22px; border: none; border-radius: var(--radius-sm); background: var(--primary-gradient); color: var(--primary-text); font-weight: 700; box-shadow: 0 4px 12px rgba(29, 58, 122, 0.3); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card {
  background: var(--card-bg); border-radius: var(--radius-lg); padding: 22px; text-align: center;
  box-shadow: var(--card-shadow); border: 1px solid var(--card-border);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary-gradient);
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow-hover); }
.stat-card:hover::before { transform: scaleX(1); }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 500; }

.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.pagination .pagination-total { font-size: 13px; color: var(--muted); }
.pagination .pagination-total b { color: var(--primary); }
.pagination-links { display: flex; align-items: center; gap: 6px; }
.pagination-links a, .pagination-links span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; text-decoration: none; color: var(--muted);
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.pagination-links a:hover { background: var(--chip-bg); color: var(--body-text); }
.pagination-links a.pagination-current { background: var(--primary-gradient); color: var(--primary-text); box-shadow: 0 3px 8px rgba(29, 58, 122, 0.3); }
.pagination-links span.pagination-ellipsis { color: var(--muted); }
.pagination-links a.pagination-arrow { border: 1px solid var(--input-border); }

.badge-green { background: #e2f7e6; color: #1c7a34; }
.badge-blue { background: var(--badge-bg); color: var(--badge-text); }
.badge-red { background: #fde3e3; color: #a11d1d; }

.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(8, 12, 24, 0.6); backdrop-filter: blur(2px);
  align-items: flex-start; justify-content: center; z-index: 1000; padding: 40px 16px; overflow-y: auto;
}
.modal-overlay.acik { display: flex; animation: jdFadeIn 0.15s var(--ease); }
.modal-box {
  background: var(--card-bg); border-radius: var(--radius-lg); padding: 26px; width: 100%; max-width: 720px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.45), 0 2px 10px rgba(0, 0, 0, 0.12); border: 1px solid var(--card-border);
  animation: jdSlideUp 0.2s var(--ease);
}
.modal-box h3 { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.modal-actions button[type="button"] { background: var(--chip-bg); color: var(--body-text); border: 1px solid var(--input-border); padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; }
.stat-inline-row { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.stat-inline-row b { color: var(--body-text); }

@keyframes jdFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes jdSlideUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.tag-select { position: relative; }
.tag-select-box {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px;
  padding: 6px 8px; border: 1px solid var(--input-border); border-radius: var(--radius-sm); background: var(--input-bg);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.tag-select-box.acik { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.tag-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 5px;
  background: var(--primary); color: var(--primary-text); font-size: 12.5px; font-weight: 600; white-space: nowrap;
}
.tag-chip button {
  border: none; background: transparent; color: inherit; font-size: 14px; line-height: 1; padding: 0;
  opacity: 0.85;
}
.tag-chip button:hover { opacity: 1; }
.tag-select-box input {
  flex: 1 1 120px; min-width: 120px; border: none; outline: none; background: transparent; color: var(--body-text); font-size: 13px; padding: 4px 2px;
}
.tag-select-dropdown {
  display: none; position: absolute; z-index: 20; top: 100%; left: 0; right: 0; margin-top: 4px;
  max-height: 220px; overflow-y: auto; background: var(--card-bg); border: 1px solid var(--input-border);
  border-radius: var(--radius-sm); box-shadow: var(--card-shadow-hover);
}
.tag-select-dropdown.acik { display: block; }
.tag-select-option { padding: 9px 12px; font-size: 13px; cursor: pointer; transition: background 0.1s var(--ease); }
.tag-select-option:hover, .tag-select-option.aktiv { background: var(--chip-bg); }
.tag-select-empty { padding: 9px 12px; font-size: 13px; color: var(--muted); }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ---- Boshqaruv paneli "hero" banneri — rahbariyat birinchi ochganda
   ko'radigan, tizimning "jonli" va zamonaviy ekanini darhol his qildiradi. ---- */
.hero-banner {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #14264d 0%, #1d3a7a 55%, #2f56ab 100%);
  color: #fff; padding: 26px 28px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  box-shadow: 0 14px 32px -14px rgba(20, 38, 77, 0.55);
}
.hero-orb {
  position: absolute; border-radius: 50%; filter: blur(2px);
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.hero-orb-1 { width: 220px; height: 220px; top: -90px; right: -40px; }
.hero-orb-2 { width: 140px; height: 140px; bottom: -70px; right: 160px; }
.hero-text { position: relative; z-index: 1; }
.hero-greeting { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.hero-sub { font-size: 13px; color: rgba(255, 255, 255, 0.75); margin-top: 4px; }
.hero-clock {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 8px;
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 16px; border-radius: 999px; backdrop-filter: blur(4px);
}
.hero-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
@media (prefers-reduced-motion: no-preference) {
  .hero-orb-1 { animation: jrGentleFloat 7s ease-in-out infinite; }
  .hero-orb-2 { animation: jrGentleFloat 9s ease-in-out infinite; animation-delay: 1.2s; }
  .hero-live-dot { animation: jrGreenPulse 1.8s ease-in-out infinite; }
}

.stat-icon { font-size: 22px; margin-bottom: 6px; line-height: 1; }

/* ---- Professor uchun jurnal ro'yxatining "karta galereyasi" ko'rinishi
   (oddiy jadval o'rniga) — har bir kartada baholash progressi doiraviy
   ko'rsatkich bilan chiqadi. ---- */
.prof-hello { margin-bottom: 18px; }
.prof-hello-title { font-size: 21px; font-weight: 800; color: var(--body-text); letter-spacing: -0.01em; }
.prof-hello-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.prof-hello-sub b { color: var(--primary); }

.prof-jurnal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.prof-jurnal-card {
  display: block; text-decoration: none; color: inherit;
  background: var(--card-bg); border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--card-shadow); border: 1px solid var(--card-border);
  border-top: 4px solid var(--primary);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.prof-jurnal-card.prof-turi-leksiya { border-top-color: #4f8cff; }
.prof-jurnal-card.prof-turi-amaliyot { border-top-color: #16a34a; }
.prof-jurnal-card.prof-turi-mustaqil_talim { border-top-color: #f0a94a; }
.prof-jurnal-card:hover { transform: translateY(-6px); box-shadow: var(--card-shadow-hover); }
.prof-jurnal-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.prof-jurnal-fan { font-size: 17px; font-weight: 800; color: var(--body-text); letter-spacing: -0.01em; }
.prof-jurnal-guruh { font-size: 13px; color: var(--muted); margin-top: 4px; }
.prof-jurnal-meta { font-size: 11.5px; color: var(--muted); margin-top: 8px; letter-spacing: 0.02em; }
.prof-jurnal-cta { margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--primary); display: flex; align-items: center; gap: 6px; }
.prof-jurnal-cta span { display: inline-block; transition: transform 0.2s var(--ease); }
.prof-jurnal-card:hover .prof-jurnal-cta span { transform: translateX(4px); }

.prof-progress-ring {
  --progress: 0; width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--primary-light) calc(var(--progress) * 1%), var(--row-border) 0);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.prof-progress-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--card-bg); }
.prof-progress-text { position: relative; z-index: 1; font-weight: 800; font-size: 12px; color: var(--primary); }

@media (prefers-reduced-motion: no-preference) {
  .prof-jurnal-card { animation: jrFadeSlideUp 0.45s var(--ease) both; }
  .prof-jurnal-grid > *:nth-child(1) { animation-delay: 0.02s; }
  .prof-jurnal-grid > *:nth-child(2) { animation-delay: 0.07s; }
  .prof-jurnal-grid > *:nth-child(3) { animation-delay: 0.12s; }
  .prof-jurnal-grid > *:nth-child(4) { animation-delay: 0.17s; }
  .prof-jurnal-grid > *:nth-child(5) { animation-delay: 0.22s; }
  .prof-jurnal-grid > *:nth-child(6) { animation-delay: 0.27s; }
}

.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(5, 10, 24, 0.5); z-index: 190; }

@media (max-width: 768px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 200; width: 260px;
    transform: translateX(0); transition: transform 0.2s var(--ease);
  }
  html.sidebar-collapsed .sidebar {
    width: 260px; padding: 20px 0; overflow: hidden; box-shadow: none;
    transform: translateX(-100%);
  }
  html:not(.sidebar-collapsed) .sidebar-backdrop { display: block; }

  .topbar { padding: 12px 14px; flex-wrap: wrap; row-gap: 8px; }
  .topbar h1 { font-size: 16px; }
  .user-menu { font-size: 12.5px; gap: 8px; flex-wrap: wrap; }
  .content { padding: 14px; }

  .card { padding: 14px; overflow-x: auto; }
  .xod-page { padding: 16px; overflow-x: auto; }

  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form input, .inline-form select, .inline-form button { width: 100%; }

  .card-grid.three, .detail-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }

  .modal-overlay { padding: 16px 8px; }
  .modal-box { padding: 16px; max-width: calc(100vw - 24px); }

  .login-card { width: calc(100vw - 32px); max-width: 320px; padding: 26px 20px; }

  .row-actions { flex-wrap: wrap; row-gap: 6px; }
}
