/*
 * TSUE Mail Admin — PostfixAdmin 3.3.8 mavzusi
 * Asos: AdminLTE 2.4.18 (MIT) + Bootstrap 3.4.1 + Font Awesome 4.7 + Inter
 * $CONF['theme_custom_css'] orqali eng oxirida ulanadi.
 */
:root {
  --tsue-navy: #172554;
  --tsue-blue: #1e40af;
  --tsue-blue-600: #2563eb;
  --tsue-blue-dark: #1e3a8a;
  --tsue-blue-soft: #eff4ff;
  --tsue-ink: #0f172a;
  --tsue-text: #334155;
  --tsue-muted: #64748b;
  --tsue-line: #e2e8f0;
  --tsue-bg: #f1f5f9;
  --tsue-side: #0f172a;
  --tsue-side-2: #1e293b;
  --tsue-red: #dc2626;
  --tsue-radius: 10px;
  --tsue-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 2px 8px rgba(15, 23, 42, .05);
}

/* ---- Asos ------------------------------------------------------------- */
html, body { height: 100%; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  color: var(--tsue-text);
  background: var(--tsue-side);
  margin-bottom: 0;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4,
.main-header .logo, .content-header > h1 {
  font-family: "Inter", system-ui, sans-serif;
}
a { color: var(--tsue-blue); }
a:hover, a:focus { color: var(--tsue-blue-dark); }
body > .container { padding: 0; } /* bootstrap.css merosi */
.content-wrapper { background: var(--tsue-bg); }

/* ---- Yuqori panel ----------------------------------------------------- */
.skin-tsue .main-header .navbar {
  background: #fff;
  border-bottom: 1px solid var(--tsue-line);
  min-height: 56px;
}
.skin-tsue .main-header .navbar .nav > li > a,
.skin-tsue .main-header .navbar .sidebar-toggle {
  color: var(--tsue-text);
  line-height: 26px;
}
.skin-tsue .main-header .navbar .nav > li > a:hover,
.skin-tsue .main-header .navbar .nav > .open > a,
.skin-tsue .main-header .navbar .sidebar-toggle:hover {
  background: var(--tsue-bg);
  color: var(--tsue-ink);
}
.skin-tsue .main-header .navbar .sidebar-toggle { border-right: 1px solid var(--tsue-line); }
.skin-tsue .main-header .logo {
  background: var(--tsue-navy);
  color: #fff;
  border-bottom: 0;
  height: 56px;
  line-height: 56px;
  text-align: left;
  padding: 0 16px;
}
.skin-tsue .main-header .logo:hover { background: #13204a; }
.main-header .logo .logo-lg { display: flex; align-items: center; gap: 10px; height: 56px; }
.main-header .logo .logo-mini { text-align: center; }
.main-header .logo img { height: 32px; width: auto; }
.tsue-brand { font-size: 16px; font-weight: 500; letter-spacing: .1px; color: #fff; white-space: nowrap; }
.tsue-brand b { font-weight: 700; }
.main-header .navbar-custom-menu .navbar-nav > li > a { padding-top: 15px; padding-bottom: 15px; }
.main-header .user-menu > a { display: flex !important; align-items: center; gap: 8px; }

.tsue-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--tsue-blue); color: #fff;
  font-size: 13px; font-weight: 600; line-height: 1;
}
.tsue-avatar-lg { width: 64px; height: 64px; font-size: 26px; border: 3px solid rgba(255, 255, 255, .3); }
.navbar-nav > .user-menu > .dropdown-menu { border-radius: 0 0 var(--tsue-radius) var(--tsue-radius); overflow: hidden; border: 1px solid var(--tsue-line); box-shadow: 0 12px 30px rgba(15,23,42,.15); }
.navbar-nav > .user-menu > .dropdown-menu > li.user-header {
  height: auto; padding: 18px 10px;
  background: linear-gradient(135deg, var(--tsue-blue-dark), var(--tsue-blue));
}
.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p { color: #fff; margin-top: 8px; font-size: 14px; }
.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p > small { color: rgba(255,255,255,.75); }
.navbar-nav > .user-menu > .dropdown-menu > .user-footer { background: #f8fafc; }
.navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default { color: var(--tsue-text); border-radius: 6px; }

/* ---- Yon menyu -------------------------------------------------------- */
.skin-tsue .wrapper,
.skin-tsue .main-sidebar,
.skin-tsue .left-side { background: var(--tsue-side); }
.main-sidebar { padding-top: 56px; }
.skin-tsue .sidebar-menu > li.header {
  color: #64748b;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .8px;
  padding: 18px 20px 8px;
}
.skin-tsue .sidebar-menu > li > a {
  color: #cbd5e1;
  border-left: 3px solid transparent;
  padding: 11px 15px 11px 17px;
  font-weight: 500;
}
.skin-tsue .sidebar-menu > li > a > .fa { width: 22px; color: #94a3b8; }
.skin-tsue .sidebar-menu > li:hover > a { color: #fff; background: var(--tsue-side-2); }
.skin-tsue .sidebar-menu > li.active > a,
.skin-tsue .sidebar-menu > li.menu-open > a {
  color: #fff;
  background: var(--tsue-side-2);
  border-left-color: #60a5fa;
}
.skin-tsue .sidebar-menu > li.active > a > .fa,
.skin-tsue .sidebar-menu > li:hover > a > .fa { color: #93c5fd; }
.skin-tsue .sidebar-menu > li > .treeview-menu { background: #0b1222; padding: 4px 0; }
.skin-tsue .sidebar-menu .treeview-menu > li > a { color: #94a3b8; padding: 8px 5px 8px 42px; }
.skin-tsue .sidebar-menu .treeview-menu > li > a:hover,
.skin-tsue .sidebar-menu .treeview-menu > li.active > a { color: #fff; }
.skin-tsue .sidebar-menu .treeview-menu > li > a > .fa { width: 18px; }
.sidebar-mini.sidebar-collapse .main-header .logo { padding: 0; text-align: center; }

/* ---- Sahifa sarlavhasi ------------------------------------------------ */
.content-header { padding: 22px 24px 0; }
.content-header > h1 { font-size: 22px; font-weight: 600; color: var(--tsue-ink); margin: 0; }
.content-header > h1 > .fa { color: var(--tsue-blue); margin-right: 6px; font-size: 20px; }
.content-header > .breadcrumb { top: 22px; right: 24px; font-size: 13px; background: transparent; padding: 4px 0; }
.content-header > .breadcrumb > li > a { color: var(--tsue-muted); }
.content-header > .breadcrumb > li.active { color: var(--tsue-ink); }
.content { padding: 20px 24px 28px; min-height: 0; }

/* ---- Bloklar (AdminLTE box + PostfixAdmin panel) ---------------------- */
.box, .panel, .well {
  background: #fff;
  border: 1px solid var(--tsue-line);
  border-radius: var(--tsue-radius);
  box-shadow: var(--tsue-shadow);
}
.box { border-top: 1px solid var(--tsue-line); }
.box.box-primary { border-top: 3px solid var(--tsue-blue); }
.box-header.with-border, .panel-default > .panel-heading { border-bottom: 1px solid var(--tsue-line); }
.box-header { padding: 14px 18px; }
.box-header > .box-title, .box-title { font-size: 15px; font-weight: 600; color: var(--tsue-ink); }
.box-header > .box-title > .fa { color: var(--tsue-blue); margin-right: 6px; }
.box-body { padding: 16px 18px; }
.panel { overflow: hidden; margin-bottom: 22px; }
.panel-default > .panel-heading {
  background: #fff; color: var(--tsue-ink); padding: 14px 18px;
}
.panel-heading h4, .panel-heading .panel-title { font-size: 15px; font-weight: 600; margin: 0; }
.panel-body { padding: 20px; }
.panel-footer { background: #f8fafc; border-top: 1px solid var(--tsue-line); padding: 12px 18px; }

/* tahrirlash formalari markazda va o'qilishi oson kenglikda */
.tsue-page-editform form, .tsue-page-password form, .tsue-page-vacation form,
.tsue-page-sendmail form, .tsue-page-broadcast-message form, .tsue-page-users_edit-alias form {
  max-width: 880px; margin: 0 auto;
}

/* ---- Statistik kartochkalar ------------------------------------------ */
.small-box { border-radius: var(--tsue-radius); box-shadow: var(--tsue-shadow); overflow: hidden; color: #fff; }
.small-box > .inner { padding: 16px 18px; }
.small-box h3 { font-size: 32px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.5px; }
.small-box p { font-size: 14px; opacity: .9; margin: 0; }
.small-box .icon { color: rgba(255, 255, 255, .22); top: 6px; right: 14px; }
.small-box .icon > .fa { font-size: 64px; }
.small-box > .small-box-footer { background: rgba(0, 0, 0, .12); color: rgba(255, 255, 255, .9); padding: 6px 0; display: block; text-align: center; }
.small-box > a.small-box-footer:hover { background: rgba(0, 0, 0, .2); color: #fff; }
.tsue-box-blue   { background: linear-gradient(135deg, #1e40af, #2563eb); }
.tsue-box-green  { background: linear-gradient(135deg, #047857, #10b981); }
.tsue-box-amber  { background: linear-gradient(135deg, #b45309, #f59e0b); }
.tsue-box-violet { background: linear-gradient(135deg, #5b21b6, #8b5cf6); }

.tsue-progress-row { margin-bottom: 14px; }
.tsue-progress-row:last-child { margin-bottom: 2px; }
.tsue-progress-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.tsue-progress-num { font-weight: 600; color: var(--tsue-ink); }
.tsue-progress-num small { color: var(--tsue-muted); font-weight: 400; }
.progress.progress-sm { height: 8px; border-radius: 999px; background: #eef2f7; margin: 0; box-shadow: none; }
.progress-sm .progress-bar { border-radius: 999px; }
.tsue-bar-talaba    { background: #2563eb; }
.tsue-bar-oqituvchi { background: #16a34a; }
.tsue-bar-xodim     { background: #d97706; }
.tsue-bar-ekspert   { background: #7c3aed; }
.tsue-bar-none      { background: #94a3b8; }
.tsue-quick .btn { margin: 0 6px 8px 0; }
.btn-box-tool { color: var(--tsue-blue); font-size: 13px; }

/* ---- Formalar --------------------------------------------------------- */
.control-label, label { color: var(--tsue-ink); font-weight: 600; }
.help-block, .text-muted { color: var(--tsue-muted); font-size: 12px; }
.form-control {
  height: 38px; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: none;
  color: var(--tsue-ink); transition: border-color .15s, box-shadow .15s;
}
select.form-control { padding: 6px 10px; }
textarea.form-control { height: auto; }
.form-control:focus { border-color: var(--tsue-blue); box-shadow: 0 0 0 3px rgba(30, 64, 175, .15); }
.has-error .form-control { border-color: var(--tsue-red); }
.has-error .help-block, .has-error .control-label { color: var(--tsue-red); }
input[type="checkbox"] { accent-color: var(--tsue-blue); width: 16px; height: 16px; }
.form-group { margin-bottom: 18px; }

/* ---- Tugmalar --------------------------------------------------------- */
.btn { border-radius: 8px; font-weight: 500; padding: 7px 14px; }
.btn-sm, .btn-xs { border-radius: 6px; }
.btn-primary { background: var(--tsue-blue); border-color: var(--tsue-blue); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active {
  background: var(--tsue-blue-dark); border-color: var(--tsue-blue-dark);
}
.btn-default { background: #fff; border-color: #cbd5e1; color: var(--tsue-text); }
.btn-default:hover { background: #f8fafc; border-color: #94a3b8; }
.btn-danger { background: var(--tsue-red); border-color: var(--tsue-red); }
.btn-warning { background: #f59e0b; border-color: #f59e0b; }

/* ---- Jadvallar -------------------------------------------------------- */
.table { background: #fff; margin-bottom: 0; }
.table > thead > tr > th, .table > tbody > tr.header > td, .table tr.header th {
  background: #f8fafc; color: var(--tsue-muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .3px; border-bottom: 1px solid var(--tsue-line);
  padding: 10px 12px;
}
.table > tbody > tr > td { border-top: 1px solid #f1f5f9; padding: 10px 12px; vertical-align: middle; }
.table > tbody > tr:hover { background: #f8fafc; }
.table .btn { padding: 4px 12px; font-size: 13px; }
.searchresult { background: #fde68a; border-radius: 3px; padding: 0 2px; }
.pagination > li > a, .pagination > li > span { color: var(--tsue-blue); border-color: var(--tsue-line); }
.pagination > .active > a, .pagination > .active > span { background: var(--tsue-blue); border-color: var(--tsue-blue); }

/* ---- Toifa belgilari -------------------------------------------------- */
.tsue-cat {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap;
}
.tsue-cat-talaba    { background: #dbeafe; color: #1e40af; }
.tsue-cat-oqituvchi { background: #dcfce7; color: #166534; }
.tsue-cat-xodim     { background: #fef3c7; color: #92400e; }
.tsue-cat-ekspert   { background: #ede9fe; color: #5b21b6; }
.tsue-cat-none      { background: #f1f5f9; color: #64748b; font-weight: 500; }

/* ---- Kvota ------------------------------------------------------------ */
.quota_bg { border: 0; border-radius: 999px; background: #e2e8f0; height: 16px; }
.quota { border-radius: 999px; }
.quota_low  { background: #22c55e; }
.quota_mid  { background: #f59e0b; }
.quota_high { background: var(--tsue-red); }

/* ---- Xabarlar --------------------------------------------------------- */
.alert, .callout { border-radius: 8px; border-width: 0 0 0 4px; border-style: solid; }
.alert-success { background: #f0fdf4; border-color: #22c55e; color: #166534; }
.alert-danger  { background: #fef2f2; border-color: var(--tsue-red); color: #991b1b; }
.alert-info, .callout.callout-info { background: var(--tsue-blue-soft) !important; border-color: var(--tsue-blue) !important; color: var(--tsue-blue-dark) !important; }
.alert-warning, .callout.callout-warning { background: #fffbeb !important; border-color: #f59e0b !important; color: #92400e !important; }

/* ---- Pastki qism ------------------------------------------------------ */
.main-footer.footer {
  position: static; height: auto; line-height: 1.6;
  background: #fff; border-top: 1px solid var(--tsue-line);
  color: var(--tsue-muted); font-size: 12.5px; padding: 14px 24px;
}
.main-footer a { color: var(--tsue-muted); }
.main-footer a:hover { color: var(--tsue-blue); }
.tsue-footer-sep { margin: 0 8px; color: #cbd5e1; }

/* ---- Kirish sahifasi -------------------------------------------------- */
body.page-login, body.page-password-recover, body.page-password-change { background: #fff; }
body.page-login .main-footer, body.page-password-recover .main-footer, body.page-password-change .main-footer { display: none; }
.tsue-login { display: flex; min-height: 100vh; }
.tsue-login-hero {
  flex: 1 1 55%;
  position: relative;
  display: flex; align-items: flex-end;
  background: linear-gradient(180deg, rgba(23, 37, 84, .35) 0%, rgba(23, 37, 84, .92) 100%),
              url(../images/tsue-login-bg.jpg) center / cover no-repeat;
  color: #fff;
  padding: 56px;
}
.tsue-login-hero-inner { max-width: 560px; }
.tsue-login-hero-logo { height: 64px; margin-bottom: 22px; }
.tsue-login-hero h1 { color: #fff; font-size: 30px; font-weight: 700; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.3px; }
.tsue-login-hero p { font-size: 16px; color: rgba(255, 255, 255, .85); margin-bottom: 26px; }
.tsue-login-points { list-style: none; padding: 0; margin: 0; }
.tsue-login-points li { margin-bottom: 10px; color: rgba(255, 255, 255, .9); font-size: 14px; }
.tsue-login-points .fa { width: 26px; height: 26px; line-height: 26px; text-align: center; border-radius: 6px; background: rgba(255, 255, 255, .15); margin-right: 10px; }
.tsue-login-panel { flex: 0 0 480px; display: flex; align-items: center; justify-content: center; padding: 40px 48px; background: #fff; }
div#login.tsue-login-card { width: 100%; max-width: 380px; margin: 0; }
.tsue-login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; color: var(--tsue-ink); font-size: 17px; }
.tsue-login-brand img { height: 44px; }
.tsue-login-brand small { display: block; font-size: 12px; color: var(--tsue-muted); }
.tsue-login-card .h2 { font-size: 24px; font-weight: 700; color: var(--tsue-ink); margin: 0 0 6px; text-align: left; text-shadow: none; }
.tsue-login-hint { color: var(--tsue-muted); margin-bottom: 26px; white-space: pre-line; }
.tsue-login-card .form-control { height: 44px; padding-right: 40px; }
.tsue-login-card .form-control-feedback { top: 26px; line-height: 44px; height: 44px; color: #94a3b8; }
.tsue-login-card select { width: 100%; height: 44px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px 10px; background: #fff; }
.tsue-login-card .btn-lg { height: 46px; font-size: 15px; font-weight: 600; margin-top: 6px; }
.tsue-login-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--tsue-line); text-align: center; font-size: 13px; }

/* parolni tiklash / almashtirish (eski shablonlar) */
.tsue-auth > .navbar { display: none; }
body.page-password-recover .tsue-auth, body.page-password-change .tsue-auth {
  max-width: 460px; margin: 10vh auto; padding: 32px; background: #fff;
  border: 1px solid var(--tsue-line); border-radius: 14px; box-shadow: 0 20px 50px rgba(15, 23, 42, .12);
}

/* ---- Mobil ------------------------------------------------------------ */
@media (max-width: 991px) {
  .tsue-login-hero { display: none; }
  .tsue-login-panel { flex: 1 1 auto; }
}
@media (max-width: 767px) {
  .content-header > .breadcrumb { position: static; margin-top: 6px; }
  .content { padding: 14px; }
  .main-sidebar { padding-top: 112px; }
}

/* flash_error.tpl dagi <br> lar bo'sh joy qoldirmasin; xabarlar yuqorida */
.tsue-auth > br, section.content > br { display: none; }
.tsue-auth > .alert { position: fixed; top: 18px; right: 18px; z-index: 1000; max-width: 440px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
.alert ul { margin: 0; padding-left: 18px; }

/* yon menyudagi uzun nomlar */
.skin-tsue .sidebar-menu > li > a > span:not(.pull-right-container) {
  display: inline-block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom;
}

/* sarlavha content-header da bor, forma ichida takrorlanmasin */
.tsue-page-editform #edit_form > .panel-heading { display: none; }
