/* ============================================
   Voting System — Professional Mobile-First Theme
   Bilingual (Arabic / English) RTL/LTR Aware
   ============================================ */

:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --primary-dark: #0f2942;
    --accent: #d4a017;
    --accent-light: #f6c84c;
    --bg: #f7f8fc;
    --surface: #ffffff;
    --surface-2: #f1f3f9;
    --text: #1a202c;
    --text-muted: #4a5568;
    --text-soft: #718096;
    --border: #e2e8f0;
    --success: #38a169;
    --danger: #e53e3e;
    --warning: #dd6b20;
    --info: #3182ce;
    --shadow-sm: 0 1px 3px rgba(15, 41, 66, 0.06), 0 1px 2px rgba(15, 41, 66, 0.04);
    --shadow: 0 4px 12px rgba(15, 41, 66, 0.08), 0 2px 4px rgba(15, 41, 66, 0.04);
    --shadow-lg: 0 12px 32px rgba(15, 41, 66, 0.12), 0 4px 12px rgba(15, 41, 66, 0.06);
    --shadow-xl: 0 20px 48px rgba(15, 41, 66, 0.16);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, 'Cairo', 'Tajawal', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

body[dir="rtl"] {
    font-family: 'Cairo', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}

/* Prevent horizontal scroll on mobile */
html, body { overflow-x: hidden; max-width: 100%; }

/* ============================================
   NAVIGATION (Mobile-First with Hamburger)
   ============================================ */
.app-navbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.app-navbar .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.4);
}

.brand-text { display: none; }

/* Hamburger button — visible on mobile */
.hamburger {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    padding: 0;
}
.hamburger span {
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Nav links — mobile is a slide-down panel */
.nav-links {
    display: none;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
    width: 100%;
    padding: 12px 16px 16px;
    background: var(--primary-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    animation: slideDown 0.25s ease;
}
.nav-links.show { display: flex; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.nav-link-item {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 15px;
    text-align: start;
}
.nav-link-item:hover,
.nav-link-item:active {
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.nav-link-item.active {
    background: rgba(255,255,255,0.18);
    color: #fff;
}

.lang-toggle {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
}
.lang-toggle:hover { color: #fff; background: rgba(255,255,255,0.25); }

/* Desktop nav layout */
@media (min-width: 900px) {
    .app-navbar .container-fluid {
        padding: 14px 24px;
        flex-wrap: nowrap;
    }
    .brand { font-size: 20px; }
    .brand-logo { width: 44px; height: 44px; font-size: 22px; }
    .brand-text { display: inline; }
    .hamburger { display: none; }
    .nav-links {
        display: flex !important;
        flex-direction: row;
        flex-wrap: wrap;
        width: auto;
        padding: 0;
        background: transparent;
        border: none;
        animation: none;
        gap: 4px;
    }
    .nav-link-item { padding: 8px 14px; }
    .lang-toggle { margin-top: 0; padding: 6px 14px; }
}

/* ============================================
   PAGE WRAP
   ============================================ */
.page-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 14px 48px;
}
@media (min-width: 768px) {
    .page-wrap { padding: 32px 24px 64px; }
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 6px;
    line-height: 1.3;
}
.page-subtitle {
    color: var(--text-muted);
    margin: 0 0 20px;
    font-size: 14px;
}
@media (min-width: 768px) {
    .page-title { font-size: 28px; margin-bottom: 8px; }
    .page-subtitle { font-size: 16px; margin-bottom: 24px; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    border-radius: var(--radius);
    padding: 28px 20px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.hero::before {
    content: '';
    position: absolute;
    top: -40%;
    inset-inline-end: -30%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.18) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 {
    font-size: clamp(22px, 6vw, 38px);
    font-weight: 800;
    margin: 0 0 10px;
    position: relative;
    z-index: 1;
    line-height: 1.25;
}
.hero p {
    font-size: clamp(13px, 3.5vw, 17px);
    color: rgba(255,255,255,0.88);
    max-width: 700px;
    margin: 0 0 20px;
    position: relative;
    z-index: 1;
}
.hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
@media (min-width: 768px) {
    .hero { padding: 48px 36px; border-radius: var(--radius-xl); margin-bottom: 32px; }
    .hero-actions { gap: 12px; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 18px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    line-height: 1.2;
    white-space: nowrap;
    min-height: 44px; /* iOS tap target */
}
@media (min-width: 768px) {
    .btn { padding: 11px 22px; font-size: 15px; }
}

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25); }
.btn-primary:hover { background: var(--primary-dark); color:#fff; }

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(212, 160, 23, 0.35);
}
.btn-accent:hover { color: var(--primary-dark); }

.btn-outline { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.4); }
.btn-outline:hover { background: rgba(255,255,255,0.18); color: #fff; }

.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #2f855a; color: #fff; }

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

.btn-sm { padding: 8px 12px; font-size: 13px; min-height: 36px; }
.btn-block { width: 100%; }

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 32px; }
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}
@media (min-width: 768px) {
    .stat-card { padding: 24px; gap: 16px; }
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .stat-icon { width: 56px; height: 56px; font-size: 24px; }
}

.stat-icon.blue   { background: #ebf5ff; color: var(--info); }
.stat-icon.green  { background: #e6fffa; color: var(--success); }
.stat-icon.orange { background: #fff5eb; color: var(--warning); }
.stat-icon.gold   { background: #fffbeb; color: #b7791f; }
.stat-icon.purple { background: #f3e8ff; color: #6b46c1; }

.stat-info { min-width: 0; flex: 1; }
.stat-info h3 { margin: 0; font-size: 20px; font-weight: 700; color: var(--primary-dark); line-height: 1.2; }
.stat-info p { margin: 2px 0 0; color: var(--text-muted); font-size: 12px; }
@media (min-width: 768px) {
    .stat-info h3 { font-size: 28px; }
    .stat-info p { font-size: 14px; }
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 16px;
}
@media (min-width: 768px) {
    .card { padding: 24px; margin-bottom: 24px; }
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
@media (min-width: 768px) {
    .card-header { margin-bottom: 20px; padding-bottom: 16px; gap: 12px; }
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}
@media (min-width: 768px) {
    .card-title { font-size: 20px; }
}

/* ============================================
   CANDIDATE CARDS
   ============================================ */
.candidate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 480px) {
    .candidate-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
}
@media (min-width: 768px) {
    .candidate-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
}

.candidate-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}
.candidate-card:active,
.candidate-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow);
}

.candidate-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.18), var(--shadow);
}

.candidate-card.selected::after {
    content: '✓';
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 26px;
    height: 26px;
    background: var(--accent);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
@media (min-width: 768px) {
    .candidate-card.selected::after { width: 32px; height: 32px; font-size: 18px; top: 12px; inset-inline-end: 12px; }
}

.candidate-photo-wrap {
    width:100%;
    height:auto;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--surface-2), var(--border));
    display:block;
   
    align-items: center;
    justify-content: center;
    overflow: revert;
}
@media (min-width: 768px) {
    .candidate-photo-wrap { aspect-ratio: auto; height: 200px; }
}

.candidate-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-photo-placeholder {
    font-size: 40px;
    color: var(--text-soft);
}
@media (min-width: 768px) {
    .candidate-photo-placeholder { font-size: 60px; }
}

.candidate-body { padding: 10px; }
@media (min-width: 768px) {
    .candidate-body { padding: 16px; }
}

.candidate-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 4px;
    line-height: 1.3;
    overflow-wrap: break-word;
}
@media (min-width: 768px) {
    .candidate-name { font-size: 16px; margin-bottom: 6px; }
}

.candidate-meta {
    color: var(--text-muted);
    font-size: 11px;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-wrap: break-word;
}
@media (min-width: 768px) {
    .candidate-meta { font-size: 13px; }
}

.dept-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--surface-2);
    color: var(--primary);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
}
@media (min-width: 768px) {
    .dept-badge { padding: 4px 10px; font-size: 12px; }
}

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 14px; }
.form-label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    font-size: 14px;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    font-size: 16px; /* 16px prevents iOS zoom */
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
    min-height: 44px;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.12);
}
select.form-control { cursor: pointer; }

.form-text { color: var(--text-soft); font-size: 12px; margin-top: 4px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 600px) {
    .form-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}

.field-validation-error,
.text-danger { color: var(--danger); font-size: 13px; margin-top: 4px; display: block; }

.validation-summary-errors {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    color: var(--danger);
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}
.validation-summary-errors ul { margin: 0; padding-inline-start: 20px; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    line-height: 1.4;
}
.alert-success { background: #f0fff4; color: #22543d; border-color: #c6f6d5; }
.alert-danger  { background: #fff5f5; color: #742a2a; border-color: #fed7d7; }
.alert-warning { background: #fffaf0; color: #7b341e; border-color: #feebc8; }
.alert-info    { background: #ebf8ff; color: #2c5282; border-color: #bee3f8; }

/* ============================================
   TABLES
   ============================================ */
.table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
}
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    min-width: 600px; /* force horizontal scroll on mobile */
}
.table thead th {
    background: var(--surface-2);
    color: var(--primary-dark);
    font-weight: 700;
    text-align: start;
    padding: 12px 14px;
    font-size: 13px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 13px;
}
.table tbody tr:last-child td { border-bottom: none; }

@media (min-width: 768px) {
    .table thead th, .table tbody td { padding: 14px 16px; font-size: 14px; }
}

/* ============================================
   STAGES STRIP
   ============================================ */
.stages {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 20px;
    background: var(--surface);
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
@media (min-width: 600px) {
    .stages { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 768px) {
    .stages { padding: 16px; gap: 8px; margin-bottom: 32px; }
}

.stage-item {
    padding: 12px 8px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-muted);
    text-align: center;
    font-weight: 600;
    border: 1.5px solid transparent;
    font-size: 12px;
    line-height: 1.3;
}
@media (min-width: 768px) {
    .stage-item { padding: 14px 16px; font-size: 14px; }
}

.stage-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.25);
}
.stage-item.done {
    background: #e6fffa;
    color: var(--success);
    border-color: #b2f5ea;
}

/* ============================================
   RESULT BARS
   ============================================ */
.result-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    align-items: center;
}
.result-bar:last-child { border-bottom: none; }
.result-bar .result-name {
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    grid-column: 1 / -1;
}
.result-bar .bar-track {
    grid-column: 1;
    height: 10px;
    background: var(--surface-2);
    border-radius: 999px;
    overflow: hidden;
}
.result-bar .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 999px;
    transition: width 0.6s ease;
}
.result-bar .bar-count {
    grid-column: 2;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 14px;
    min-width: 40px;
    text-align: end;
}
@media (min-width: 600px) {
    .result-bar { grid-template-columns: 200px 1fr 60px; gap: 12px; padding: 12px 0; }
    .result-bar .result-name { grid-column: 1; font-size: 14px; }
    .result-bar .bar-track { grid-column: 2; height: 12px; }
    .result-bar .bar-count { grid-column: 3; min-width: auto; }
}

/* ============================================
   AUTH (Login)
   ============================================ */
.auth-wrap {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 14px;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    box-shadow: var(--shadow-xl);
}
@media (min-width: 768px) {
    .auth-card { padding: 40px 32px; }
}
.auth-card h2 { margin: 0 0 8px; color: var(--primary-dark); font-size: 22px; }
.auth-card p  { margin: 0 0 22px; color: var(--text-muted); font-size: 14px; }

/* ============================================
   FOOTER
   ============================================ */
.app-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 18px 14px;
    font-size: 13px;
    margin-top: 32px;
}

/* ============================================
   LIVE PILL
   ============================================ */
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff5f5;
    color: var(--danger);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.live-pill::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse 1.5s ease infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

/* ============================================
   SUMMARY CHIP
   ============================================ */
.summary-chip {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px solid #fde68a;
    color: #78350f;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 600;
    margin-bottom: 14px;
    font-size: 14px;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-3 { margin-top: 14px; }
.mb-3 { margin-bottom: 14px; }
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* Make groups of admin action buttons wrap nicely on phones */
@media (max-width: 767px) {
    .flex-between {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .flex-between > div { display: flex; flex-direction: column; gap: 4px; }
    .flex-between .d-flex { flex-wrap: wrap; }
    .flex-between .d-flex .btn { flex: 1 1 calc(50% - 4px); }
}

/* Hide scrollbars on horizontal scroll containers (but keep functional) */
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 4px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }



.candidate-thumb {
    width: 80px !important;
    height: 40px !important;
    min-width: 40px;
    max-width: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.candidate-thumb-placeholder {
    width: auto;
    height: auto;
    border-radius: 50%;
    background: #f1f3f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.cand-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%; /* ← يحفظ الوجه (الجزء العلوي) */
}