/* =========================================================
   TalentHub.uz — main stylesheet
   Brand color: #4dbd74 (green)
   ========================================================= */

:root {
    --green:        #4dbd74;
    --green-dark:   #3aa05f;
    --green-darker: #2d8049;
    --green-light:  #e8f7ee;
    --green-soft:   #f3fbf6;
    --green-border: #c7ecd4;

    --text:         #1f2937;
    --text-soft:    #4b5563;
    --muted:        #6b7280;
    --line:         #e5e7eb;
    --bg:           #f7faf8;
    --white:        #ffffff;

    --warn:         #f59e0b;
    --danger:       #ef4444;
    --info:         #0ea5e9;

    --radius:       10px;
    --radius-sm:    6px;
    --shadow-sm:    0 1px 3px rgba(16,24,40,.06);
    --shadow:       0 4px 14px rgba(16,24,40,.08);
    --shadow-lg:    0 12px 32px rgba(16,24,40,.12);
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--green-dark); text-decoration: none; transition: color .15s; }
a:hover { color: var(--green-darker); text-decoration: none; }

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

/* ---------- Header ---------- */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.header-row { display: flex; align-items: center; gap: 28px; }
.logo {
    font-weight: 800;
    font-size: 22px;
    color: #111;
    letter-spacing: -0.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.logo::before {
    content: "";
    display: inline-block;
    width: 26px; height: 26px;
    background: var(--green);
    border-radius: 7px;
    box-shadow: inset 0 -3px 0 var(--green-darker);
}
.logo span { color: var(--green); }
.nav { display: flex; gap: 6px; flex: 1; }
.nav a {
    color: var(--text);
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}
.nav a:hover { background: var(--green-soft); color: var(--green-darker); }
.nav a.active { background: var(--green-light); color: var(--green-darker); }
.auth-links { display: flex; gap: 8px; align-items: center; }

/* ---------- Footer ---------- */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 32px 0;
    margin-top: 64px;
}
.site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.site-footer a { color: #cbd5e1; margin-right: 18px; }
.site-footer a:hover { color: var(--green); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    background: var(--white);
    color: var(--text);
    transition: all .15s ease;
    line-height: 1.2;
    text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }

.btn-primary {
    background: var(--green);
    color: var(--white);
    border-color: var(--green);
    box-shadow: 0 2px 6px rgba(77,189,116,.35);
}
.btn-primary:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(77,189,116,.45);
}

.btn-outline {
    background: transparent;
    color: var(--green-dark);
    border-color: var(--green);
}
.btn-outline:hover {
    background: var(--green-light);
    color: var(--green-darker);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}
.btn-ghost:hover { background: #f3f4f6; }

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

.btn-link { background: transparent; border: none; color: var(--green-dark); padding: 4px 8px; }
.btn-link:hover { color: var(--green-darker); text-decoration: underline; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

/* ---------- Forms ---------- */
form label {
    display: block;
    margin: 14px 0;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}
form input, form select, form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    margin-top: 6px;
    font-size: 14px;
    font-family: inherit;
    background: var(--white);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
form input:focus, form select:focus, form textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(77,189,116,.18);
}
form textarea { resize: vertical; min-height: 100px; }
form input[type=checkbox], form input[type=radio] { width: auto; margin-right: 6px; }

.big-form {
    background: var(--white);
    padding: 28px;
    border-radius: var(--radius);
    max-width: 760px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ---------- Auth pages ---------- */
.auth-page {
    background: linear-gradient(135deg, var(--green-soft) 0%, #ffffff 60%, var(--green-light) 100%);
    min-height: 100vh;
    display: flex;
}
.auth-wrapper { margin: auto; width: 100%; max-width: 440px; padding: 24px; }
.auth-logo {
    display: block;
    text-align: center;
    font-weight: 800;
    font-size: 30px;
    color: var(--green-dark);
    margin-bottom: 22px;
    letter-spacing: -0.5px;
}
.auth-card {
    background: var(--white);
    padding: 32px;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--green-border);
}
.auth-card h1 { margin: 0 0 6px; font-size: 22px; }
.auth-card .subtitle { color: var(--muted); margin-bottom: 18px; font-size: 14px; }

/* ---------- Alerts ---------- */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin: 14px 0;
    font-size: 14px;
    border: 1px solid transparent;
}
.alert-success { background: var(--green-light); color: var(--green-darker); border-color: var(--green-border); }
.alert-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-info    { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.alert-warn    { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 60%, var(--green-darker) 100%);
    color: #fff;
    padding: 70px 24px;
    border-radius: 14px;
    margin: 24px 0 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(45,128,73,.25);
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    pointer-events: none;
}
.hero::before { width: 280px; height: 280px; top: -100px; right: -80px; }
.hero::after  { width: 200px; height: 200px; bottom: -80px; left: -60px; }
.hero h1 { margin: 0 0 14px; font-size: 38px; font-weight: 800; letter-spacing: -0.8px; position: relative; }
.hero p { margin: 0 0 28px; opacity: .92; font-size: 17px; position: relative; }
.hero-search {
    display: flex;
    gap: 8px;
    max-width: 760px;
    margin: 0 auto;
    flex-wrap: wrap;
    background: rgba(255,255,255,.18);
    padding: 8px;
    border-radius: 12px;
    backdrop-filter: blur(6px);
    position: relative;
}
.hero-search input,
.hero-search select {
    flex: 1;
    min-width: 180px;
    padding: 13px 16px;
    border-radius: 8px;
    border: none;
    margin: 0;
    font-size: 14px;
}
.hero-search input:focus, .hero-search select:focus { box-shadow: 0 0 0 3px rgba(255,255,255,.4); }
.hero-search .btn { padding: 13px 28px; }

/* ---------- Sections ---------- */
.section { margin: 48px 0; }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.4px; }
.section h2 { margin: 0 0 18px; font-size: 24px; font-weight: 700; letter-spacing: -0.4px; }
.section-head a { font-size: 14px; font-weight: 500; color: var(--green-dark); }

/* ---------- Categories ---------- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.category-card {
    background: var(--white);
    padding: 20px 16px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--text);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 14px;
    transition: all .18s ease;
    position: relative;
    overflow: hidden;
}
.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, var(--green-soft));
    opacity: 0;
    transition: opacity .18s;
}
.category-card:hover {
    border-color: var(--green);
    color: var(--green-darker);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    text-decoration: none;
}
.category-card:hover::before { opacity: 1; }
.category-card > * { position: relative; }

/* ---------- Job / resume cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.job-card {
    display: block;
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    color: var(--text);
    position: relative;
    transition: all .18s ease;
}
.job-card:hover {
    border-color: var(--green);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--text);
}
.job-card-title {
    font-weight: 700;
    margin-bottom: 6px;
    font-size: 16px;
    color: var(--text);
}
.job-card-company {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}
.job-card-salary {
    color: var(--green-darker);
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 10px;
}
.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--text-soft);
}
.job-card-meta span {
    background: var(--green-soft);
    color: var(--green-darker);
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: #e5e7eb;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.badge-verified { background: var(--green-light); color: var(--green-darker); }
.badge-agency   { background: #fef3c7; color: #92400e; }
.badge-top      {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    box-shadow: 0 2px 6px rgba(245,158,11,.4);
}
.badge-new      { background: var(--green); color: #fff; }

/* ---------- CTA ---------- */
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cta-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    text-align: center;
    transition: all .18s;
}
.cta-card:hover { border-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.cta-card h3 { margin: 0 0 10px; font-size: 18px; }
.cta-card p { color: var(--muted); margin: 0 0 18px; }

/* ---------- Filter bar ---------- */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--white);
    padding: 16px;
    border-radius: var(--radius);
    margin: 18px 0;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.filter-bar input, .filter-bar select { flex: 1; min-width: 160px; margin: 0; }

/* ---------- Job detail ---------- */
.job-detail {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    max-width: 920px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.job-detail h1 { margin-top: 0; font-size: 28px; letter-spacing: -0.5px; }
.job-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin: 20px 0;
    padding: 18px;
    background: var(--green-soft);
    border-radius: var(--radius-sm);
    border: 1px solid var(--green-border);
}
.job-meta div { font-size: 14px; }
.job-meta strong { color: var(--green-darker); display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 4px; }
.job-contacts {
    margin: 22px 0;
    padding: 18px;
    background: var(--green-light);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--green);
}
.apply-form { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }

/* ---------- Tables ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.table th { background: var(--green-soft); font-size: 12px; color: var(--green-darker); text-transform: uppercase; letter-spacing: 0.3px; font-weight: 600; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafdfb; }

/* ---------- Info box ---------- */
.info-box {
    background: var(--white);
    padding: 18px 22px;
    border-radius: var(--radius);
    border-left: 4px solid var(--green);
    margin: 18px 0;
    box-shadow: var(--shadow-sm);
}

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; margin: 28px 0; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}
.pagination a:hover { border-color: var(--green); color: var(--green-darker); text-decoration: none; }
.pagination .active, .pagination span.active { background: var(--green); border-color: var(--green); color: #fff; }

/* ---------- Admin layout ---------- */
.admin-body { display: flex; min-height: 100vh; margin: 0; background: #f1f5f4; }
.admin-sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: #cbd5e1;
    padding: 24px 18px;
}
.admin-logo { font-weight: 800; font-size: 22px; color: var(--white); margin-bottom: 28px; padding: 0 8px; display: flex; align-items: center; gap: 8px; }
.admin-logo::before {
    content: "";
    display: inline-block;
    width: 24px; height: 24px;
    background: var(--green);
    border-radius: 6px;
}
.admin-logo small { color: #94a3b8; font-weight: 400; font-size: 11px; display: block; margin-top: 2px; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 2px; }
.admin-sidebar nav a {
    color: #cbd5e1;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all .15s;
}
.admin-sidebar nav a:hover { background: rgba(77,189,116,.15); color: var(--green); text-decoration: none; }
.admin-sidebar nav a.active { background: var(--green); color: var(--white); }
.admin-sidebar hr { border: none; border-top: 1px solid rgba(255,255,255,.08); margin: 14px 0; }
.admin-content { flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
    background: var(--white);
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}
.admin-main { padding: 28px; flex: 1; }
.admin-main h1 { margin-top: 0; font-size: 26px; letter-spacing: -0.4px; }

/* ---------- Stat cards ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 16px; }
.stat-card {
    background: var(--white);
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 4px; height: 100%;
    background: var(--green);
}
.stat-num { font-size: 30px; font-weight: 800; color: #0f172a; letter-spacing: -0.8px; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.3px; font-weight: 500; }

/* ---------- Payment ---------- */
.payment-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    max-width: 520px;
    margin: 18px 0;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.payment-card div { margin: 8px 0; font-size: 14px; }

/* ---------- Empty state ---------- */
.empty-state {
    background: var(--white);
    border: 1px dashed var(--green-border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    color: var(--muted);
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted  { color: var(--muted); }
.text-green  { color: var(--green-dark); }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .hero h1 { font-size: 28px; }
    .hero { padding: 48px 18px; }
    .cta { grid-template-columns: 1fr; }
    .row-2, .row-3 { grid-template-columns: 1fr; }
    .header-row { flex-wrap: wrap; gap: 14px; }
    .nav { order: 3; flex-basis: 100%; flex-wrap: wrap; }
    .admin-sidebar { width: 100%; padding: 14px; }
    .admin-body { flex-direction: column; }
}
