:root {
    --bg: #f8fafc; /* body background (white-ish) */
    --panel: #ffffff; /* sidebar/topbar (light) */
    --card: #ffffff; /* cards (light) */
    --border: #bdbdbd; /* separators */
    --text: #000000; /* primary text (slate-900) */
    --muted: #64748b; /* muted text */
    --brand: #1e40af; /* brand indigo */
    --primary: #2563eb;
    --primary-600: #1d4ed8;
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.12);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.12);
    --pill-bg: #eef2ff; /* gentle indigo-50 */
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
}
body {
    margin: 0;
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        Segoe UI,
        Roboto,
        Arial,
        "Noto Sans",
        "Helvetica Neue",
        "Apple Color Emoji",
        "Segoe UI Emoji";
    background: var(--bg);
    color: var(--text);
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: linear-gradient(
        180deg,
        #fefeff 0%,
        #ffffff 100%
    ); /* qoladi — brend blok */
    padding: 12px 16px;
    position: relative;
}
.sidebar .brand {
    font-weight: 700;
    font-size: 22px;
    color: #000000;
    margin-bottom: 12px;
}
.sidebar .card {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 14px 12px;
    color: #000000;
}
.sidebar .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: #ffffff;
    color: #000000;
    margin-right: 10px;
}
.sidebar .muted {
    opacity: 0.9;
    font-size: 13px;
}
.nav {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    color: #000000;
    text-decoration: none;
    border-radius: 10px;
    opacity: 0.95;
}
.nav a:hover {
    background: rgb(205, 203, 203);
}
.nav a.active {
    background: rgb(205, 203, 203);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.content {
    padding: 8px 28px;
    background: var(--bg);
}
.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    margin-bottom: 8px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-600);
}
.btn-ghost {
    background: transparent;
    color: #000000;
}

.page-title {
    font-size: 28px;
    font-weight: 800;
    margin: 6px 0 4px;
    text-align: left !important;
}
.page-sub {
    color: var(--muted);
    margin-bottom: 18px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(2, 6, 23, 0.04);
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table thead th {
    text-align: left;
    font-size: 12.5px;
    font-weight: 700;
    color: #475569;
    padding: 14px 18px;
    background: #f1f5f9; /* light header */
    border-bottom: 1px solid var(--border);
}
.table tbody tr {
    border-top: 1px solid var(--border);
}
.table tbody tr:hover {
    background: rgba(2, 6, 23, 0.03);
}
.table td {
    padding: 16px 18px;
    vertical-align: middle;
    color: var(--text);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: grid;
    place-items: center;
}
.user-name {
    font-weight: 700;
}
.user-login {
    color: var(--muted);
    font-size: 13px;
    margin-top: 2px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    background: var(--pill-bg);
    color: #1e40af;
}
.pill.role-blue {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid rgba(37, 99, 235, 0.25);
}
.pill.success {
    background: var(--success-bg);
    color: var(--success);
}
.pill.danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.actions {
    display: flex;
    gap: 14px;
    align-items: center;
}
.icon-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 6px;
}
.icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}
.icon.blue {
    color: #2563eb;
}
.icon.green {
    color: #16a34a;
}
.icon.red {
    color: #dc2626;
}

/* Forms */
.form {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    max-width: 720px;
}
.form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.form label {
    display: block;
    font-size: 13px;
    color: #000000;
    margin-bottom: 6px;
}
.input,
.select,
.textarea {
    width: 100%;
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
}
.input:focus,
.select:focus,
.textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(147, 197, 253, 0.35);
}
.text-right {
    text-align: right;
}
.mt-16 {
    margin-top: 16px;
}
.mt-24 {
    margin-top: 24px;
}

/* --- Auth (Login) --- */
.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 26px 22px;
    box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}
.auth-title {
    font-size: 24px;
    font-weight: 800;
    margin: 4px 0 6px;
}
.auth-sub {
    color: var(--muted);
    margin-bottom: 18px;
}
.brand-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1e3a8a;
    font-weight: 800;
    margin-bottom: 8px;
}
.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
}
.field {
    margin-bottom: 14px;
}
.field label {
    display: block;
    font-size: 13px;
    color: #334155;
    margin-bottom: 6px;
}
.field .input {
    width: 100%;
}
.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #334155;
}
.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-full {
    width: 100%;
}
.error-msg {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(220, 38, 38, 0.35);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}
.success-msg {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(5, 150, 105, 0.35);
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}
.link {
    color: #2563eb;
    text-decoration: none;
}
.link:hover {
    text-decoration: underline;
}

.page-wrap {
    min-height: calc(100vh - 60px);
    padding: 48px 16px;
    background: #f5f6fa; /* sahifa fondagi och kulrang */
    display: flex;
    flex-direction: column;
    align-items: center;
}
.page-title {
    margin: 0 0 28px;
    font-weight: 800;
    font-size: 44px;
    line-height: 1.1;
    color: #0f172a;
    text-align: left !important;
}
.notice-card {
    width: 100%;
    max-width: 760px;
    padding: 48px 28px;
    text-align: center;
    background: #fffbea; /* yumshoq sariq */
    border: 1px solid #f6e59d;
    border-radius: 16px;
}
.notice-icon {
    font-size: 64px;
    opacity: 0.7;
    margin-bottom: 12px;
}
.notice-title {
    margin: 12px 0;
    font-size: 28px;
    font-weight: 700;
    color: #8b5e00;
}
.notice-text {
    margin: 0;
    font-size: 20px;
    color: #b07a00;
}
.brand {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 10px 16px;
}
.brand-text {
    display: flex;
    flex-direction: column;
}
.brand-text span {
    color: var(--muted);
    font-size: 12px;
}

/* Topbar o'zi */
.topbar {
    display: flex;
    justify-content: flex-end;
    /* padding: 15px 20px; */
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

/* Profil dropdown konteyneri */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

/* Hover qilinganda ochilsin */
.profile-dropdown:hover .profile-menu {
    display: block;
}

.drop-link:hover {
    background: #f3f4f6;
}

/* Form-item (logout qatori) */
.drop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: none;
    margin: 0;
    background: transparent;
    width: 100%;
    cursor: pointer;
}

.drop-item:hover {
    background: #fef2f2;
}

/* Icon (svg) */
.drop-item svg {
    width: 16px;
    height: 16px;
}

/* Logout matni — linkga o‘xshash button */
.linklike {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

/* Danger ranglar */
.drop-item.danger svg,
.drop-item.danger .linklike {
    color: #e11d48;
}

.profile-btn:hover {
    background: #f3f4f6;
}

.profile-icon {
    width: 20px;
    height: 20px;
}
/* Hamma hover shu containerga bog'liq */
.profile-dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 10px; /* MUHIM: pastdagi bo'shliqni container ichiga qo'ydik */
}

/* Profil tugmasi */
.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    font-size: 15px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.15s;
}

.profile-btn:hover,
.profile-dropdown:hover .profile-btn {
    background: #f3f4f6;
}

/* Dropdown menyu */
.profile-menu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 190px;
    background: #ffffff;
    border-radius: 10px;
    /* box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14); */
    padding: 6px 0;
    display: none;
    z-index: 9999;
}

/* Hover containerda turguncha menyu ochiq turadi */
.profile-dropdown:hover .profile-menu {
    display: block;
}

.drop-link:hover {
    background: #f3f4f6;
}

/* Logout item */
.drop-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: none;
    margin: 0;
    background: transparent;
    width: 100%;
    cursor: pointer;
}

.drop-item:hover {
    background: #fef2f2;
}

.drop-item svg {
    width: 16px;
    height: 16px;
}

.linklike {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
}

/* Danger ranglar */
.drop-item.danger svg,
.drop-item.danger .linklike {
    color: #e11d48;
}
.profile-btn:hover {
    background: #f3f4f6;
}
.profile-dropdown:hover .profile-btn {
    background: transparent !important;
}
.profile-menu a,
.drop-item {
    background: white !important;
}
.permission-block {
    border: 1px solid #ddd;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    background: #fafafa;
}

.permission-block h3 {
    margin-bottom: 12px;
    font-size: 12px;
    text-decoration: underline;
}

.permission-block h4 {
    margin-top: 12px;
    font-size: 10px;
    text-decoration: underline;
}

.permissions-list label {
    display: block;
    margin: 4px 0;
}

.kurslar-container {
    display: flex;
    gap: 32px;
}

.kurs-column {
    min-width: 120px;
}
