/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius);
    font-size: 12.5px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 12px rgba(220,38,58,0.3);
}
.btn-primary:hover {
    background: #ef4444;
    box-shadow: 0 2px 18px rgba(220,38,58,0.4);
}

.btn-danger  { background: #991b1b; color: #fca5a5; border: 1px solid rgba(220,38,58,0.25); }
.btn-danger:hover { background: #b91c1c; }
.btn-success { background: rgba(22,163,74,0.15); color: #86efac; border: 1px solid rgba(22,163,74,0.25); }
.btn-success:hover { background: rgba(22,163,74,0.22); }

.btn-ghost {
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    border: var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); color: var(--text); border: var(--border-hover); }

.btn:active  { transform: scale(0.97); }
.btn:disabled { opacity: 0.28; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm  { height: 28px; padding: 0 11px; font-size: 11.5px; border-radius: 6px; }
.btn-full { width: 100%; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    transition: border var(--transition), background var(--transition);
}

.card:hover { border: var(--border-hover); background: var(--bg-card-hover); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.card-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i { color: var(--text-muted); font-size: 12px; }

.card-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.input-group { margin-bottom: 14px; }

.input-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.input {
    width: 100%;
    height: 38px;
    background: var(--bg-input);
    border: var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 0 11px;
    outline: none;
    transition: border var(--transition), background var(--transition), box-shadow var(--transition);
}

.input:focus {
    border: var(--border-focus);
    background: rgba(255,255,255,0.055);
    box-shadow: 0 0 0 3px rgba(220,38,58,0.08);
}

.input::placeholder { color: var(--text-muted); }

textarea.input {
    height: auto;
    padding: 9px 11px;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

select.input { appearance: none; cursor: pointer; }

/* ── Table ───────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }

th {
    text-align: left;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
    padding: 8px 12px;
    border-bottom: var(--border);
}

td {
    padding: 11px 12px;
    border-bottom: var(--border);
    font-size: 12.5px;
    color: var(--text);
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.01); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    height: 19px;
    padding: 0 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-pending  { background: rgba(217,119,6,0.1);    color: #fbbf24; border: 1px solid rgba(217,119,6,0.2); }
.badge-approved { background: rgba(22,163,74,0.1);    color: #86efac; border: 1px solid rgba(22,163,74,0.2); }
.badge-rejected { background: rgba(220,38,58,0.1);    color: #fca5a5; border: 1px solid rgba(220,38,58,0.18); }
.badge-lider    { background: rgba(220,38,58,0.1);    color: #f87171; border: 1px solid rgba(220,38,58,0.2); }
.badge-colider  { background: rgba(37,99,235,0.1);    color: #93c5fd; border: 1px solid rgba(37,99,235,0.2); }
.badge-angajat  { background: rgba(22,163,74,0.1);    color: #86efac; border: 1px solid rgba(22,163,74,0.2); }
.badge-aplicant { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.07); }
.badge-staff    { background: rgba(220,38,58,0.09);   color: #f87171; border: 1px solid rgba(220,38,58,0.18); }

/* ── Stats grid ──────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-box {
    background: var(--bg-card);
    border: var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-box::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-box:hover { border: var(--border-hover); background: var(--bg-card-hover); }
.stat-box:hover::after { opacity: 0.6; }

.stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-sub { font-size: 11px; color: var(--text-muted); }

.stat-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-bottom: 4px;
}

.stat-icon-red    { background: rgba(220,38,58,0.1);  color: #f87171; }
.stat-icon-green  { background: rgba(22,163,74,0.1);  color: #86efac; }
.stat-icon-blue   { background: rgba(37,99,235,0.1);  color: #93c5fd; }
.stat-icon-gold   { background: rgba(217,119,6,0.1);  color: #fbbf24; }
.stat-icon-purple { background: rgba(124,58,237,0.1); color: #c4b5fd; }

/* ── Progress ────────────────────────────────────────────────────────────── */
.progress-wrap { margin-top: 4px; }

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-track {
    height: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 99px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), rgba(220,38,58,0.55));
    transition: width 0.5s ease;
}

/* ── Leaderboard ─────────────────────────────────────────────────────────── */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 5px;
    transition: all var(--transition);
}

.leaderboard-item:hover { border: var(--border-hover); background: var(--bg-card-hover); }

.leaderboard-rank {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
}

.leaderboard-rank.gold   { background: rgba(217,119,6,0.12);   color: #fbbf24; }
.leaderboard-rank.silver { background: rgba(148,163,184,0.1);  color: #94a3b8; }
.leaderboard-rank.bronze { background: rgba(180,83,9,0.1);     color: #d97706; }

.leaderboard-name  { font-size: 13px; font-weight: 600; color: var(--text); }
.leaderboard-sub   { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.leaderboard-value { font-size: 14px; font-weight: 700; color: var(--accent); margin-left: auto; }

/* ── Forum ───────────────────────────────────────────────────────────────── */
.forum-cat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-card);
    border: var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all var(--transition);
}

.forum-cat:hover { background: var(--bg-card-hover); border: var(--border-hover); transform: translateY(-1px); }

.forum-cat-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    background: rgba(220,38,58,0.08);
    border: 1px solid rgba(220,38,58,0.13);
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.forum-cat-info  { flex: 1; min-width: 0; }
.forum-cat-name  { font-size: 13.5px; font-weight: 600; color: var(--text); }
.forum-cat-desc  { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.forum-cat-count { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }

.thread-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    background: var(--bg-card);
    border: var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 5px;
    cursor: pointer;
    transition: all var(--transition);
}

.thread-item:hover { background: var(--bg-card-hover); border: var(--border-hover); }

.thread-pin   { color: #f87171; font-size: 9px; margin-top: 4px; flex-shrink: 0; }
.thread-title { font-size: 13px; font-weight: 600; color: var(--text); }
.thread-meta  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ── Chat ────────────────────────────────────────────────────────────────── */
.chat-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--topbar-h) - 110px);
    min-height: 400px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    background: var(--bg-card);
    border: var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-msg { display: flex; flex-direction: column; gap: 3px; }
.chat-msg-header { display: flex; align-items: center; gap: 8px; }
.chat-msg-user { font-size: 12px; font-weight: 700; color: #f87171; }
.chat-msg-time { font-size: 10px; color: var(--text-muted); }
.chat-msg-text { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

.chat-input-row {
    display: flex;
    gap: 7px;
    padding: 10px;
    background: rgba(255,255,255,0.018);
    border: var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.chat-input-row .input { flex: 1; height: 36px; }

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.tab-bar {
    display: flex;
    gap: 2px;
    background: rgba(255,255,255,0.018);
    border: var(--border);
    border-radius: var(--radius-lg);
    padding: 3px;
    margin-bottom: 20px;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 6px 10px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.tab:hover { color: var(--text-dim); background: rgba(255,255,255,0.03); }
.tab.active { background: var(--accent); color: #fff; box-shadow: 0 1px 10px rgba(220,38,58,0.3); }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal {
    background: #0e0e1a;
    border: var(--border);
    border-radius: var(--radius-xl);
    padding: 26px;
    width: 460px;
    max-width: 95vw;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 28px 70px rgba(0,0,0,0.75), 0 0 0 1px rgba(255,255,255,0.035);
}

.modal-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text);
    letter-spacing: -0.025em;
}

.modal-actions {
    display: flex;
    gap: 7px;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: var(--border);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE components (max 600px)
═══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    /* Butoane full-width in forme */
    .btn-full { width: 100%; }

    /* Tab flex:none ca sa nu se stranga */
    .tab { flex: none; }

    /* Modal fullscreen pe telefon */
    .modal {
        width: 96vw !important;
        padding: 20px 16px;
        max-height: 92vh;
    }
    .modal-actions { flex-direction: column-reverse; }
    .modal-actions .btn { width: 100%; justify-content: center; }

    /* Card actions wrap */
    .card-header { align-items: flex-start; }

    /* Vehicule badge-uri wrap */
    div[style*="display:flex;gap:6px;align-items:center;flex-wrap:wrap"] {
        justify-content: flex-start !important;
    }

    /* Aplicatii evaluate buttons stacked */
    div[style*="display:flex;gap:6px"] .btn-sm {
        flex: 1;
        justify-content: center;
    }

    /* Input actions in admin (role select + buttons) */
    td[style*="display:flex;gap:6px"] {
        flex-wrap: wrap;
        gap: 4px !important;
    }
    td[style*="display:flex;gap:6px"] select.input {
        width: 100% !important;
    }
}

/* ── Section accent ──────────────────────────────────────────────────────── */
.section-accent { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }

.section-accent-bar {
    width: 3px;
    height: 16px;
    background: var(--accent);
    border-radius: 99px;
    opacity: 0.8;
}

.section-accent-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
