/* xona.tsue.uz — admin dashboard */
.brand-link .brand-image { border-radius: 8px; box-shadow: none !important; }

.xd .card { border: 1px solid var(--bs-border-color-translucent); border-radius: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.xd .card-header { background: transparent; border-bottom: 1px solid var(--bs-border-color-translucent); padding: .85rem 1.1rem; }

.xd-status { border-left: 5px solid; }
.xd-status-ok { border-left-color: #18bc9c !important; }
.xd-status-bad { border-left-color: #e74c3c !important; }
.xd-status-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #fff; }
.xd-status-ok .xd-status-icon { background: #18bc9c; }
.xd-status-bad .xd-status-icon { background: #e74c3c; }

.xd-kpi { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 14px; color: #fff !important;
          text-decoration: none !important; height: 100%; box-shadow: 0 4px 14px rgba(0,0,0,.08); transition: transform .12s ease, box-shadow .12s ease; }
a.xd-kpi:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.xd-kpi-icon { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 12px; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 24px; }
.xd-kpi-num { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.xd-kpi-of { font-size: 1.1rem; font-weight: 500; opacity: .8; }
.xd-kpi-lbl { font-size: .9rem; opacity: .92; }
.xd-green { background: linear-gradient(135deg, #18bc9c, #12967c); }
.xd-red   { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.xd-gray  { background: linear-gradient(135deg, #7b8a8b, #5d6d6e); }
.xd-blue  { background: linear-gradient(135deg, #3498db, #2471a3); }
.xd-teal  { background: linear-gradient(135deg, #2c3e50, #1a252f); }

.xd-mini { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; height: 100%; border-radius: 12px;
           background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); color: var(--bs-body-color) !important;
           text-decoration: none !important; transition: border-color .12s ease; }
.xd-mini:hover { border-color: #18bc9c; }
.xd-mini i { color: #18bc9c; font-size: 18px; margin-bottom: 4px; }
.xd-mini b { font-size: 1.45rem; line-height: 1.2; }
.xd-mini span { font-size: .85rem; color: var(--bs-secondary-color); }
.xd-mini-warn { border-color: #f39c12; }
.xd-mini-warn i, .xd-mini-warn b { color: #d68910; }

.xd-table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); font-weight: 600;
               padding: .6rem 1.1rem !important; background: transparent; }
.xd-table td { padding: .6rem 1.1rem !important; vertical-align: middle; }
.xd-empty { text-align: center; color: var(--bs-secondary-color); padding: 2rem 1rem !important; }
.xd-empty i { margin-right: 6px; }

/* Excel import page */
.xi-step { display: flex; gap: 14px; margin-bottom: 14px; }
.xi-step-num { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: #18bc9c; color: #fff; display: grid; place-items: center; font-weight: 700; }

/* Terminal "API" tab: use the full width instead of the label/value columns */
.form-group.field-api_overview > .row > label { display: none; }
.form-group.field-api_overview > .row > div.field-api_overview { flex: 0 0 100%; max-width: 100%; }
.form-group.field-api_overview .readonly { padding: 0; background: transparent; border: 0; }

/* Radio / checkbox lists (e.g. user "Admin turi" and "Ko'rinadigan menyular") */
.field-admin_type ul, .field-menus ul, .field-specials ul, .field-scope ul, #id_admin_type, #id_menus, #id_specials, #id_scope { list-style: none; padding-left: 0; margin: 0; }
.field-admin_type li, .field-menus li, .field-specials li, .field-scope li { margin: 4px 0; }
.field-admin_type label, .field-menus label, .field-specials label, .field-scope label { display: inline-flex; align-items: center; gap: 8px; font-weight: normal; cursor: pointer; }
.field-admin_type input, .field-menus input, .field-specials input, .field-scope input { margin: 0; width: 16px; height: 16px; }
.field-menus ul, #id_menus { column-count: 2; column-gap: 32px; }
@media (max-width: 991px) { .field-menus ul, #id_menus { column-count: 1; } }

/* Teacher photo next to the name */
.xd-person { display: inline-flex; align-items: center; gap: 10px; }
.xd-avatar { border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--bs-secondary-bg);
             border: 1px solid var(--bs-border-color-translucent); }
.xd-avatar-text { display: inline-grid; place-items: center; width: 44px; height: 44px; font-size: 14px;
                  font-weight: 700; color: #fff; background: #18bc9c; border: 0; }

/* Lesson detail */
.xl-photo { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bs-body-bg);
            box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.xl-photo-text { display: inline-grid; place-items: center; font-size: 42px; font-weight: 700; color: #fff; background: #18bc9c; }
.xl-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--bs-secondary-color); font-weight: 600; }
.xl-value { font-size: 1.05rem; font-weight: 600; }
.xl-window { padding: 14px 18px; border-radius: 12px; background: rgba(24,188,156,.08); border: 1px solid rgba(24,188,156,.35); }
.xl-window-time { font-size: 1.6rem; font-weight: 700; color: #12967c; }

/* Door window badge: open now / upcoming / finished */
.badge.xw { font-size: .85rem; font-weight: 600; padding: .4em .65em; }
.badge.xw i { margin-right: 3px; font-size: .8em; }
.xw-now  { background: #18bc9c; color: #fff; }
.xw-soon { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.xw-past { background: #f1f3f5; color: #868e96; border: 1px solid #dee2e6; }
[data-bs-theme=dark] .xw-soon { background: rgba(33,150,243,.18); color: #90caf9; border-color: rgba(144,202,249,.4); }
[data-bs-theme=dark] .xw-past { background: rgba(255,255,255,.06); color: #adb5bd; border-color: rgba(255,255,255,.12); }
.xl-suggest { padding: 12px 16px; border-radius: 12px; background: rgba(52,152,219,.07); border: 1px solid rgba(52,152,219,.35); }
.xl-perm { padding: 10px 14px; border-radius: 12px; background: rgba(52,152,219,.06); border: 1px solid var(--bs-border-color-translucent); }

/* Multi-select autocompletes that start hidden (permanent access scope) must not end up 0px wide,
   and need a visible border. */
.field-buildings .select2-container, .field-terminals .select2-container { width: 100% !important; max-width: 560px; }
.select2-container--admin-autocomplete .select2-selection--multiple,
.select2-container--default .select2-selection--multiple { min-height: 38px; border: 1px solid var(--bs-border-color) !important; border-radius: 6px; }

/* Door control */
.xdoor-icon { font-size: 64px; line-height: 1; margin: 8px 0 12px; }
.xdoor-btn-icon { width: 34px; height: 34px; border-radius: 8px; display: inline-grid; place-items: center; }
.xdoor-action { background: var(--bs-body-bg); }
.select2-container--admin-autocomplete .select2-selection--single,
.select2-container--default .select2-selection--single { border: 1px solid var(--bs-border-color) !important; border-radius: 6px; min-height: 34px; }
.field-room .select2-container, .field-person .select2-container { width: 100% !important; max-width: 560px; }

/* Kirish jurnali */
.xe-time { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }
.xe-date { font-size: .78rem; color: var(--bs-secondary-color); }
.xe-pill { display: inline-flex; align-items: center; gap: 6px; padding: .3em .75em; border-radius: 999px;
           font-weight: 600; font-size: .82rem; white-space: nowrap; }
.xe-basis { font-size: .85rem; font-weight: 500; }
.xe-basis i { margin-right: 3px; }
.xe-unknown { width: 40px; height: 40px; font-size: 16px; background: var(--bs-secondary-bg) !important; color: var(--bs-secondary-color) !important; border: 1px dashed var(--bs-border-color); }
.xe-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.xe-card { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--bs-border-color);
           border-radius: 10px; background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none;
           transition: box-shadow .15s; }
a.xe-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); color: var(--bs-body-color); }
.xe-card i { font-size: 1.3rem; }
.xe-card b { font-size: 1.35rem; line-height: 1; }
.xe-card span { font-size: .8rem; color: var(--bs-secondary-color); }
.xe-card-on { border-width: 2px; }

/* Bootstrap 5 has no .hidden: Django's actions.js toggles it on "All N selected" / "Select all N" */
.actions .hidden { display: none !important; }
.xe-snap { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--bs-border-color);
           transition: transform .15s; }
.xe-snap:hover { transform: scale(1.06); box-shadow: 0 2px 10px rgba(0,0,0,.15); }
.xe-nosnap { color: var(--bs-secondary-color); }
