/* Andijon ta'lim boshqarmasi uchun yagona panel uslubi. */
:root {
  --ink: #202b3c;
  --muted: #526176;
  --blue: #353271;
  --bg: #f3f5f8;
  --line: #dfe4eb;
  --green: #246d50;
  --red: #a53d45;
  --brand-dark: #222052;
  --brand-mid: #393678;
  --surface: #fff;
  --control-line: #bdc8d5;
  --focus: #625bb0;
}

html { font-size: 16px; }
body { color: var(--ink); background: var(--bg); font-family: 'Segoe UI', 'Noto Sans', Arial, sans-serif; font-size: 15px; line-height: 1.6; }
.sidebar, .login-intro { background: var(--brand-dark); }
.sidebar { color: #e6e5f2; }
.brand { font-size: 20px; font-weight: 700; letter-spacing: 0; }
.brand small { font-size: 10px; font-weight: 650; letter-spacing: .08em; color: #d2d0e8; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: #c4c1dd; }
nav a { font-size: 14px; font-weight: 500; line-height: 1.4; }
nav a:hover, nav a.selected { background: var(--brand-mid); color: #fff; }
.sidebar-bottom { font-size: 12px; }
.sidebar-bottom p, .sidebar-bottom strong { color: #dbd9ed; }
.topbar { background: #fff; min-height: 76px; height: auto; }
.breadcrumb, .user-bar small { color: var(--muted); font-size: 12px; }
.user-bar strong { font-size: 14px; }
.topbar .user-bar { gap: 14px; }
.notification-trigger { position: relative; width: 34px; height: 38px; display: grid; place-items: center; color: #85898f; border-radius: 6px; }
.notification-trigger svg { width: 22px; height: 22px; }
.notification-trigger:hover { color: #353271; background: #f2f2f8; }
.notification-trigger:focus-visible { outline: 3px solid #a8a3d8; outline-offset: 2px; }
.notification-badge { position: absolute; top: 0; right: -4px; min-width: 17px; height: 17px; padding: 0 3px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 9px; background: #2aa764; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
.topbar .profile-menu { position: relative; margin: 0; padding: 0; border: 0; }
.topbar .profile-menu>summary { width: 38px; height: 38px; min-height: 38px; display: grid; place-items: center; margin: 0; padding: 0; border: 0; border-radius: 50%; background: #f1f2f4; }
.topbar .profile-menu>summary:hover, .topbar .profile-menu[open]>summary { background: #e8eaf0; }
.topbar .profile-menu>summary:focus-visible { outline: 3px solid #a8a3d8; outline-offset: 2px; }
.profile-avatar { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; }
.profile-avatar svg { width: 35px; height: 35px; fill: #a9adb3; }
main { max-width: 1500px; padding: 30px 36px 20px; }
.institution-heading { max-width: none; margin-bottom: 18px; color: #38346d; font-size: 15px; font-weight: 650; }
.page-heading { margin: 16px 0 24px; align-items: flex-start; }
.page-heading h1 { margin: 0 0 5px; color: #1e2540; font-size: clamp(26px, 2.4vw, 32px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.page-heading p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.55; }
.eyebrow { margin-bottom: 8px; color: #615c88; font-size: 11px; font-weight: 750; letter-spacing: .1em; }
h2 { color: #242940; font-size: 18px; font-weight: 700; line-height: 1.35; }
h3 { color: #252b40; font-size: 15px; font-weight: 700; }
.panel, .stat { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: 0 2px 8px #25265308; }
.panel-heading p, .muted, .readiness-list small { color: var(--muted); font-size: 13px; line-height: 1.55; }
.pill { color: #4a477b; background: #f3f2fa; border-color: #e3e1ee; font-size: 12px; }
.notice { font-size: 14px; }
.empty { color: var(--muted); font-size: 14px; }

.btn-primary, .btn-secondary, .btn-danger { min-height: 44px; padding: 10px 16px; border-radius: 7px; font-size: 14px; font-weight: 650; line-height: 1.35; text-align: center; }
.btn-primary { color: #fff; background: var(--blue); border-color: var(--blue); }
.btn-primary:hover, .btn-primary:focus-visible { color: #fff; background: #29265d; border-color: #29265d; }
.btn-primary:active { color: #fff; background: #201d50; }
.btn-primary .ui-icon { color: #c8f0cf; }
.btn-secondary { color: #2c3350; background: #fff; border-color: var(--control-line); }
.btn-secondary:hover { color: #222052; background: #f4f3fa; border-color: #817cae; }
.btn-danger { color: #96323c; background: #fff7f7; border-color: #e0b8bd; }
.btn-danger:hover { color: #842b34; background: #fcecee; border-color: #c96871; }
.btn-danger .ui-icon { color: #b13441; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-danger:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #a8a3d8; outline-offset: 2px; }
.btn-primary.small, .btn-secondary.small, .btn-danger.small { min-height: 38px; padding: 7px 11px; font-size: 13px; }

input, select, textarea { min-height: 44px; border-color: var(--control-line); border-radius: 7px; color: #202b3c; background: #fff; font-size: 14px; }
input::placeholder, textarea::placeholder { color: #68768a; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: #625bb0; box-shadow: 0 0 0 3px #625bb021; }
label, .field>label { color: #323c50; font-size: 14px; font-weight: 650; }
.field small, .readiness-list small { color: var(--muted); font-size: 13px; }
summary { color: #353271; font-size: 14px; font-weight: 600; }

th { color: #4a586d; background: #f8f9fb; font-size: 13px; font-weight: 700; letter-spacing: .01em; }
td, td strong, .table-title { color: #28364b; font-size: 14px; line-height: 1.5; }
td { padding-top: 14px; padding-bottom: 14px; }
td small, .task-id { color: #5b6a7e; font-size: 12px; }
.badge { font-size: 12px; font-weight: 650; }
.badge.status-completed { color: #20684e; background: #e8f5ee; }
.badge.status-cancelled { color: #9a3d45; background: #fbeef0; }
.badge.status-sent { color: #434576; background: #efeff8; }
.pagination, .summary-strip, footer { color: var(--muted); font-size: 13px; }
.pagination a, .text-link { color: #353271; font-size: 13px; font-weight: 650; }
.stat-top { color: #46556b; font-size: 14px; font-weight: 600; }
.stat>strong { font-size: 34px; color: #202749; }
.stat small { color: var(--muted); font-size: 13px; }
.stat .red, .red { color: var(--red)!important; }
.stat .green, .green { color: var(--green)!important; }
.legend>div, .org-row>div:first-child, .org-row span { color: #45536a; font-size: 13px; }
.legend>div strong { font-size: 13px; }
.org-list .empty { text-align: left; padding: 18px 0 8px; }
.directory-shortcuts .panel-heading { padding-bottom: 8px; }
.directory-shortcuts .actions { padding: 0 24px 22px; }
.ai-workflow li strong { font-size: 15px; }
.ai-workflow li span { color: var(--muted); font-size: 14px; }
.organizations-table th, .organizations-table td, .organizations-table .table-title { font-size: 14px; }

/* Ko‘p filtrli topshiriqlar sahifasida har bir maydon o‘qilishi kerak. */
.task-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.task-filter .filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; font-size: 12px; }
.task-filter .filter-field>span { color: #46536b; font-size: 12px; font-weight: 700; }
.task-filter .filter-field input, .task-filter .filter-field select { width: 100%; min-width: 0; max-width: 100%; }
.task-filter .filter-search { grid-column: span 2; }
.task-filter .filter-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.task-filter .filter-actions>* { flex: 1 1 auto; }

.login-intro h1 { font-size: clamp(30px, 3vw, 42px); font-weight: 650; line-height: 1.25; }
.login-intro p:not(.eyebrow), .login-intro small, .login-intro .institution-name { color: #e6e4f3; }
.login-card h2 { font-size: 26px; }
.login-note { color: var(--muted); font-size: 13px; }

@media (max-width: 1100px) {
  .task-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-filter .filter-search { grid-column: span 2; }
}
@media (max-width: 900px) {
  .table-wrap .directory-table { display: block; min-width: 0; width: 100%; }
  .directory-table thead { display: none; }
  .directory-table tbody { display: grid; gap: 12px; padding: 12px; }
  .directory-table tbody tr { display: block; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
  .directory-table tbody td { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-bottom: 1px solid #eceef2; overflow-wrap: anywhere; }
  .directory-table tbody td:last-child { border-bottom: 0; }
  .directory-table tbody td::before { color: #5c5a7c; font-size: 12px; font-weight: 700; }
  .departments-table tbody td:nth-child(1)::before { content: 'Bo‘lim'; }
  .positions-table tbody td:nth-child(1)::before { content: 'Lavozim'; }
  .departments-table tbody td:nth-child(2)::before { content: 'Qo‘llanishi'; }
  .positions-table tbody td:nth-child(2)::before { content: 'Tashkilot / qo‘llanishi'; }
  .directory-table tbody td:nth-child(3)::before { content: 'Xodimlar'; }
  .directory-table tbody td:nth-child(4)::before { content: 'Holati'; }
  .directory-table tbody td:nth-child(5)::before { content: 'Amallar'; }
  .directory-table tbody td.empty { display: block; }
  .directory-table tbody td.empty::before { content: none; }
}
@media (max-width: 850px) {
  .sidebar { position: sticky; top: 0; width: 100%; height: auto; max-height: none; padding: 10px 14px; flex-direction: row; align-items: center; gap: 14px; overflow: visible; }
  .sidebar .brand { flex: 0 0 auto; justify-content: flex-start; font-size: 15px; white-space: nowrap; }
  .sidebar .brand>span:last-child { display: block; }
  .sidebar .brand-icon { width: 36px; height: 40px; flex-basis: 36px; }
  .sidebar .brand small { font-size: 8px; }
  .sidebar .nav-label, .sidebar .sidebar-bottom { display: none; }
  .sidebar nav { display: flex; flex: 1 1 auto; min-width: 0; gap: 4px; margin: 0; overflow-x: auto; scrollbar-width: thin; }
  .sidebar nav a { display: inline-flex; flex: 0 0 auto; flex-direction: row; align-items: center; gap: 6px; margin: 0; padding: 9px 11px; font-size: 12px; line-height: 1.25; white-space: nowrap; }
  .sidebar nav .ui-icon { width: 16px; height: 16px; flex-basis: 16px; margin: 0; }
  .workspace { margin-left: 0; }
  .topbar { min-height: 58px; padding: 8px 20px; }
  main { padding: 22px 20px; }
}
@media (max-width: 550px) {
  .directory-table tbody td { grid-template-columns: 115px minmax(0, 1fr); }
  .sidebar .brand>span:last-child { display: none; }
  .sidebar { gap: 8px; padding: 8px; }
  .sidebar nav a { font-size: 12px; }
  main { padding: 18px 14px; }
  .task-filter { grid-template-columns: 1fr; }
  .task-filter .filter-search { grid-column: auto; }
  .task-filter .filter-actions { flex-direction: column; }
  .page-heading { gap: 12px; }
  .page-heading h1 { font-size: 26px; }
  .stat-grid { gap: 10px; }
  .stat { padding: 15px; }
  .stat-top, .stat small { font-size: 12px; }
  .directory-shortcuts .actions { padding: 0 18px 18px; }
}
