/* ============================================================
   O'qituvchilar davomat tizimi — umumiy dizayn
   ============================================================ */

:root {
    --brand: #1c5f7a;
    --brand-dark: #144a60;
    --accent: #2a8a6e;
    --accent-dark: #1f6b54;
    --danger: #dc2626;
    --warning: #d97706;
    --success: #10b981;
    --bg: #f4f7f8;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --text: #1f2937;
    --text-muted: #6b7280;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Navbar ---- */
.navbar {
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    color: #fff;
    padding: 14px 0;
    box-shadow: var(--shadow);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand:hover {
    text-decoration: none;
}

.navbar-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.navbar-links a {
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.95rem;
    font-weight: 500;
}

.navbar-links a:hover {
    color: #fff;
}

.navbar-user {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ---- Cards ---- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--brand-dark);
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-dark);
    margin: 28px 0 20px;
}

/* ---- Forms ---- */
label {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    margin-bottom: 6px;
    color: var(--text);
}

.form-group {
    margin-bottom: 18px;
}

input[type="text"], input[type="password"], input[type="email"],
input[type="tel"], input[type="date"], input[type="time"], input[type="number"],
select, textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.15s;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    box-shadow: 0 6px 16px rgba(42, 138, 110, 0.25);
}

.btn-secondary {
    background: #fff;
    color: var(--brand);
    border: 1.5px solid var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.82rem;
}

.btn-block {
    width: 100%;
}

/* ---- Alerts / flash ---- */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-muted { background: #f3f4f6; color: #4b5563; }

/* ---- Table ---- */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

tr:last-child td {
    border-bottom: none;
}

/* ---- Login page ---- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 40px 34px;
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    font-size: 1.3rem;
    text-align: center;
    color: var(--brand-dark);
    margin: 0 0 6px;
}

.login-card p.sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 26px;
}

/* ---- Weekly schedule table ---- */
.schedule-grid {
    display: grid;
    grid-template-columns: 110px 1fr 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.schedule-grid .day-label {
    font-weight: 700;
    font-size: 0.88rem;
}

/* ---- Form sections (kartani ichki bo'limlarga ajratish) ---- */
.form-section {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid var(--border);
}

.form-section:first-child {
    padding-top: 0;
    margin-top: 0;
    border-top: none;
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 4px;
}

.form-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.form-section-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 4px 0 16px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ---- Geolokatsiya kiritish (vergul bilan yoki xaritadan) ---- */
.geo-paste-input {
    font-family: 'SFMono-Regular', Consolas, monospace;
}

.geo-paste-input.geo-filled {
    border-color: var(--success) !important;
    background: #ecfdf5;
}

.map-box {
    height: 320px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1.5px solid var(--border);
    margin-top: 10px;
}

.geo-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 8px;
}

.geo-status.geo-ok { color: var(--accent-dark); }
.geo-status.geo-empty { color: var(--text-muted); font-weight: 500; }

/* ---- Utility ---- */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }

@media (max-width: 640px) {
    .navbar-links { gap: 12px; }
    .schedule-grid { grid-template-columns: 90px 1fr; row-gap: 4px; }
    .card { padding: 18px; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .map-box { height: 260px; }
}
