/* ===== Tender platformasi — yorug' biznes dizayni (oq + ko'k) ===== */
:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-light: #eff6ff;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e6e9f0;
    --success: #16a34a;
    --success-bg: #ecfdf5;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --warn: #d97706;
    --info: #0ea5e9;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 10px 30px rgba(15, 23, 42, .06);
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --ring: 0 0 0 4px rgba(37, 99, 235, .15);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 18px; }

/* ===== Header (OXU — to'q ko'k) ===== */
:root { --navy: #0a1f5c; --navy-2: #0c2a73; --navy-line: rgba(255, 255, 255, .12); }
.site-header { background: linear-gradient(180deg, #0c2a73, #0a1f5c); color: #fff; box-shadow: 0 2px 14px rgba(8, 20, 55, .28); }
.hwrap { max-width: 1320px; margin: 0 auto; padding: 0 22px; }
.topbar { display: flex; align-items: center; gap: 18px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 800; }
.brand:hover { color: #fff; }
.brand img { height: 48px; width: auto; display: block; }
.brand .b-name { display: flex; flex-direction: column; line-height: 1.05; }
.brand .b-name b { font-size: 21px; letter-spacing: 1.5px; }
.brand .b-name small { font-size: 11px; color: #9cc1ff; letter-spacing: 3px; font-weight: 700; }
.site-title { flex: 1; text-align: center; font-size: 15px; font-weight: 700; letter-spacing: .04em; color: #eaf1ff; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; gap: 5px; margin-right: 8px; }
.lang a { padding: 4px 9px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .3); color: #cfe0ff; font-size: 12px; font-weight: 700; }
.lang a:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.lang a.active { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-nav { padding: 9px 16px; border-radius: 9px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.btn-nav:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.btn-nav.solid { background: #2563eb; border-color: #2563eb; }
.btn-nav.solid:hover { background: #1d4ed8; }

/* Tablar */
.tabbar { background: #0a1f5c; border-top: 1px solid var(--navy-line); }
.tabs { display: flex; justify-content: center; gap: 10px; padding: 11px 0; }
.tab { padding: 8px 20px; border-radius: 8px; font-size: 12.5px; font-weight: 700; color: #bcd0f5; background: rgba(255, 255, 255, .06); text-transform: uppercase; letter-spacing: .04em; }
.tab:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.tab.active { background: #1746a8; color: #fff; }

/* To'liq enli hero rasm (fon: static/img/bg.jpg) */
.hero-full {
    position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; width: 100vw;
    min-height: 520px; margin-top: -30px; margin-bottom: 0;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background-image: linear-gradient(180deg, rgba(10, 31, 92, .45), rgba(10, 31, 92, .35) 55%, rgba(10, 31, 92, .9)), url('../img/bg.jpg');
    background-color: #0a1f5c; background-size: cover; background-position: center;
}
.hero-full::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 130px;
    background: linear-gradient(180deg, rgba(244, 246, 251, 0), var(--bg)); pointer-events: none;
}
.hero-content { position: relative; z-index: 2; color: #fff; max-width: 720px; padding: 40px 22px 90px; }
.hero-content h1 { color: #fff; font-size: 42px; line-height: 1.12; margin: 0 0 16px; letter-spacing: -.02em; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.hero-content p { color: rgba(255, 255, 255, .92); font-size: 18px; margin: 0 0 26px; text-shadow: 0 1px 10px rgba(0, 0, 0, .3); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-actions .btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .4); }
.hero-actions .btn.ghost:hover { background: rgba(255, 255, 255, .26); }
.home-first-card { position: relative; z-index: 3; margin-top: -64px; }
@media (max-width: 760px) {
    .hero-full { min-height: 380px; }
    .hero-content h1 { font-size: 30px; }
    .hero-content p { font-size: 16px; }
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(180deg, var(--brand), var(--brand-dark));
    color: #fff; border: 0; cursor: pointer;
    padding: 12px 22px; border-radius: 12px; font-size: 15px; font-weight: 700;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .25); transition: transform .12s ease, box-shadow .12s ease, filter .12s;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); color: #fff; box-shadow: 0 10px 22px rgba(37, 99, 235, .3); }
.btn:active { transform: translateY(0); }
.btn.green { background: linear-gradient(180deg, #22c55e, #16a34a); box-shadow: 0 6px 16px rgba(22, 163, 74, .25); }
.btn.ghost { background: #fff; color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { color: var(--brand-dark); border-color: var(--brand); background: var(--brand-light); }
.btn.danger { background: linear-gradient(180deg, #ef4444, #dc2626); box-shadow: 0 6px 16px rgba(220, 38, 38, .25); }
.btn.block { width: 100%; }

/* ===== Cards ===== */
main { padding: 30px 0 70px; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.card-narrow { max-width: 460px; margin-left: auto; margin-right: auto; }

h1 { font-size: 27px; margin: 0 0 8px; letter-spacing: -.02em; }
h2 { font-size: 20px; margin: 0 0 6px; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.muted-sm { color: var(--muted); font-size: 14px; }
ol.muted, ul.muted { color: var(--muted); }
ol.muted li, ul.muted li { margin: 6px 0; }

/* ===== Hero ===== */
.hero {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    /* Fon rasmi: static/img/bg.jpg (yo'q bo'lsa gradient ko'rinadi) */
    background-image: linear-gradient(120deg, rgba(29, 78, 216, .92), rgba(37, 99, 235, .78)), url('../img/bg.jpg');
    background-size: cover;
    background-position: center;
}
.hero-inner { padding: 56px 36px; color: #fff; max-width: 640px; }
.hero h1 { color: #fff; font-size: 38px; line-height: 1.15; margin-bottom: 14px; }
.hero p { color: rgba(255, 255, 255, .92); font-size: 17px; margin: 0 0 24px; }
.hero .btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .35); }
.hero .btn.ghost:hover { background: rgba(255, 255, 255, .24); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Feature grid ===== */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: var(--brand-light); margin-bottom: 12px; }
.feature h3 { margin: 0 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* ===== Forms ===== */
label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 7px; color: #334155; }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=tel],
input[type=datetime-local], textarea, select {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border); background: #fff; color: var(--text);
    font-size: 15px; font-family: inherit; transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--brand); box-shadow: var(--ring); }
input[type=file] { color: var(--muted); padding: 10px; }
textarea { resize: vertical; min-height: 84px; }
.field-hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge.open { background: var(--success-bg); color: #15803d; }
.badge.closed { background: var(--danger-bg); color: #b91c1c; }
.badge.draft { background: #f1f5f9; color: #475569; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; margin: 0 -6px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 13px 14px; font-size: 14.5px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
tbody tr { transition: background .1s; }
tbody tr:hover { background: #fafbff; }
tbody tr:last-child td { border-bottom: 0; }
td .money { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ===== Messages ===== */
.messages { margin-bottom: 18px; display: grid; gap: 10px; }
.msg { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 500; border: 1px solid transparent; }
.msg.success { background: var(--success-bg); color: #15803d; border-color: #bbf7d0; }
.msg.error, .msg.danger { background: var(--danger-bg); color: #b91c1c; border-color: #fecaca; }
.msg.info, .msg.warning { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }
.errorlist { color: var(--danger); font-size: 13px; margin: 6px 0 0; padding-left: 18px; }

/* ===== Steps ===== */
.steps { display: flex; gap: 10px; margin-bottom: 22px; font-size: 13.5px; }
.steps span { flex: 1; text-align: center; padding: 10px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--border); color: var(--muted); font-weight: 600; }
.steps span.active { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-light); }
.steps span.done { color: #15803d; border-color: #bbf7d0; background: var(--success-bg); }

/* ===== Auth layout ===== */
body.auth { background: linear-gradient(135deg, #eef2ff, #f4f6fb 40%, #ecfeff); min-height: 100vh; }
.auth-wrap { max-width: 460px; margin: 5vh auto; padding: 0 18px; }
.auth-logo { text-align: center; margin-bottom: 18px; }
.auth-logo img { height: 52px; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); background: #fff; padding: 22px 0; color: var(--muted); font-size: 14px; }

/* ===== Helpers ===== */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.pdf-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--brand-light); color: var(--brand-dark); font-weight: 600; }
.checkbox-row { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-weight: 600; color: #334155; }
.checkbox-row input { width: auto; }

@media (max-width: 920px) {
    .site-title { display: none; }
}
@media (max-width: 640px) {
    .card { padding: 20px; }
    .topbar { height: 64px; gap: 10px; }
    .brand img { height: 38px; }
    .brand .b-name b { font-size: 17px; }
    .btn-nav { padding: 8px 12px; font-size: 13px; }
    .tab { padding: 7px 13px; font-size: 11.5px; }
    .lang { display: none; }
}
