/* ============================================================
   JADVALCHI — asosiy uslublar
   ============================================================ */

:root {
  --fon:        #f4f6fb;
  --panel:      #1e2235;
  --panel-och:  #2a3050;
  --asosiy:     #4f7cff;
  --asosiy-tuq: #3b62d6;
  --matn:       #1f2430;
  --kul:        #7a8195;
  --chegara:    #e3e7f0;
  --oq:         #ffffff;
  --yashil:     #16a34a;
  --qizil:      #dc2626;
  --sariq:      #d97706;
  --radius:     10px;
  --soya:       0 1px 3px rgba(20,25,50,.08), 0 6px 18px rgba(20,25,50,.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--matn);
  background: var(--fon);
}

a { color: var(--asosiy); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 12px; font-weight: 600; }
h2 { font-size: 18px; }

/* ---------- QOBIQ ---------- */
.qobiq { display: flex; min-height: 100vh; }

/* ---------- YON PANEL ---------- */
.yon-panel {
  width: 232px;
  flex: 0 0 232px;
  background: var(--panel);
  color: #c9cfe4;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.logo-belgi {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--asosiy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 17px;
}
.logo-matn { color: #fff; font-weight: 600; letter-spacing: .5px; }

.menyu { padding: 12px 10px; flex: 1; overflow-y: auto; }
.menyu-band {
  display: block;
  padding: 9px 12px;
  margin-bottom: 2px;
  border-radius: 8px;
  color: #c9cfe4;
  font-size: 14px;
}
a.menyu-band:hover { background: var(--panel-och); color: #fff; text-decoration: none; }
a.menyu-band.aktiv { background: var(--asosiy); color: #fff; }
.menyu-band.ochiq-emas { color: #626a85; cursor: default; }
.menyu-band .belgi { float: right; font-style: normal; opacity: .6; }

.yon-past {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: 13px;
}
.user-fio { color: #fff; font-weight: 500; }
.user-rol { color: #7d86a3; margin-bottom: 8px; }
.chiqish { color: #ff8a8a; font-size: 13px; }

/* ---------- ASOSIY ---------- */
.asosiy { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.tepa {
  background: var(--oq);
  border-bottom: 1px solid var(--chegara);
  padding: 0 22px;
  height: 58px;
  display: flex; align-items: center; gap: 14px;
}
.sahifa-nom { font-size: 17px; margin: 0; flex: 1; }
.tepa-ong { display: flex; align-items: center; gap: 10px; }
.maktab-nom { color: var(--kul); font-size: 14px; }
.menyu-tugma {
  display: none; background: none; border: none;
  font-size: 20px; cursor: pointer; color: var(--matn);
}

.kontent { padding: 22px; flex: 1; }

.pastki {
  padding: 14px 22px;
  color: var(--kul);
  font-size: 13px;
  border-top: 1px solid var(--chegara);
}

/* ---------- KARTALAR ---------- */
.karta {
  background: var(--oq);
  border: 1px solid var(--chegara);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--soya);
}
.karta-yupqa { padding: 12px 18px; }

.kartalar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  background: var(--oq);
  border: 1px solid var(--chegara);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--soya);
}
.stat-son { font-size: 28px; font-weight: 700; color: var(--asosiy); line-height: 1.1; }
.stat-nom { color: var(--kul); font-size: 13px; margin-top: 4px; }

.modul-royxat { margin: 0; padding-left: 18px; color: var(--kul); }
.modul-royxat li { margin-bottom: 4px; }
.modul-royxat li.tayyor { color: var(--yashil); font-weight: 500; }

.kul { color: var(--kul); }
.ong { text-align: right; }

/* ---------- JADVAL ---------- */
.jadval-oddiy { width: 100%; border-collapse: collapse; margin-top: 10px; }
.jadval-oddiy th, .jadval-oddiy td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--chegara);
  text-align: left;
  vertical-align: middle;
}
.jadval-oddiy th { color: var(--kul); font-size: 13px; font-weight: 600; }
.jadval-oddiy tbody tr:hover { background: #fafbfe; }

.belgi-holat {
  display: inline-block; padding: 2px 9px; border-radius: 20px;
  font-size: 12px; background: #eef1f7; color: var(--kul);
}
.holat-faol { background: #e7f7ee; color: var(--yashil); }
.holat-sinov { background: #fef3e2; color: var(--sariq); }
.holat-bloklangan, .holat-muddati_tugagan { background: #fdecec; color: var(--qizil); }

/* ---------- FORMA ---------- */
label { display: block; font-size: 13px; color: var(--kul); margin: 12px 0 5px; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--chegara);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: var(--oq);
  color: var(--matn);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--asosiy);
  box-shadow: 0 0 0 3px rgba(79,124,255,.15);
}
.maktab-form select { width: auto; min-width: 210px; padding: 7px 10px; font-size: 14px; }

.tugma {
  display: inline-block;
  background: var(--asosiy);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.tugma:hover { background: var(--asosiy-tuq); text-decoration: none; color: #fff; }
.tugma-keng { width: 100%; margin-top: 18px; }
.tugma-kichik { padding: 6px 12px; font-size: 13px; }

/* ---------- XABARLAR ---------- */
.xabar {
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  font-size: 14px;
  border: 1px solid transparent;
}
.xabar-ok   { background: #e7f7ee; color: #14803c; border-color: #bfe8d0; }
.xabar-xato { background: #fdecec; color: #b91c1c; border-color: #f6c9c9; }
.xabar-ogoh { background: #fef3e2; color: #a35c07; border-color: #f5dcb4; }
.xabar-info { background: #eaf1ff; color: #2b4fa8; border-color: #c9d9fb; }

/* ---------- MARKAZ SAHIFA (login, 403) ---------- */
.markaz-sahifa {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 20px;
}
.kirish-quti, .xato-quti {
  background: var(--oq);
  border: 1px solid var(--chegara);
  border-radius: 14px;
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--soya);
  text-align: center;
}
.kirish-quti form { text-align: left; }
.kirish-logo { margin-bottom: 14px; }
.kirish-logo .logo-belgi {
  width: 48px; height: 48px; font-size: 24px; margin: 0 auto; border-radius: 12px;
}
.kirish-quti h1 { font-size: 22px; margin-bottom: 2px; }
.kirish-izoh { color: var(--kul); font-size: 14px; margin: 0 0 20px; }

.xato-kod { font-size: 46px; font-weight: 700; color: var(--qizil); }
.xato-quti .tugma { margin-top: 16px; }

/* ---------- MOBIL ---------- */
@media (max-width: 860px) {
  .yon-panel {
    position: fixed; left: -240px; top: 0; z-index: 50;
    transition: left .2s ease;
  }
  .yon-panel.ochiq { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menyu-tugma { display: block; }
  .kontent { padding: 16px; }
  .tepa { padding: 0 14px; }
  .maktab-form select { min-width: 140px; }
}
