* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
:root {
    --gp1: #009BA4;
    --gp2: #006E75;
    --gp3: #E0F5F6;
    --gp4: #B2E4E6;
    --gpbg: #0D1F20;
}
body {
    font-family: system-ui, sans-serif;
    background: #f5f4f1;
    color: #111;
    min-height: 100vh;
}
.screen {
    display: none;
}
.screen.active {
    display: block;
}

/* Auth container is managed via inline style (display:flex / display:none),
   not the .screen class, to avoid conflicts. */

/* Auth Screen Custom Styling */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--gpbg);
    padding: 20px;
}
.auth-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    border: 1px solid var(--gp2);
}
.auth-header {
    background: #fff;
    padding: 30px 20px;
    text-align: center;
    border-bottom: 3px solid var(--gp1);
}
.auth-logo-img {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}
.auth-tabs {
    display: flex;
    background: #f0eded;
    border-bottom: 1px solid #ddd;
}
.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border: none;
    background: none;
    transition: 0.2s;
}
.auth-tab.active {
    background: #fff;
    color: var(--gp1);
    border-bottom: 3px solid var(--gp1);
}
.auth-body {
    padding: 30px 25px;
}
.auth-form {
    display: none;
}
.auth-form.active {
    display: block;
}
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    transition: 0.2s;
}
.form-control:focus {
    border-color: var(--gp1);
    box-shadow: 0 0 0 3px var(--gp3);
}
.auth-btn {
    width: 100%;
    padding: 12px;
    background: var(--gp1);
    color: var(--gpbg);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 10px;
}
.auth-btn:hover {
    background: var(--gp2);
    color: #fff;
}

/* Professional Explore Button for Candidates */
.explore-container {
    text-align: center;
    padding: 10px 0;
}
.explore-text {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}
.btn-explore {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gp1), var(--gp2));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,155,164,0.25);
    transition: 0.3s;
}
.btn-explore:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,155,164,0.4);
}

/* Top Navigation App Bar */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gpbg);
    padding: 10px 24px;
    color: #fff;
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.navbar-logo-img {
    height: 38px;
    width: auto;
    background: #fff;
    padding: 4px;
    border-radius: 4px;
}
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logout-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: 0.2s;
}
.logout-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: #ff4d4d;
    color: #ff4d4d;
}

.switcher {
    display: flex;
    background: #0D1F20;
    padding: 0 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.sw-tab {
    padding: 13px 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    color: rgba(255,255,255,0.5);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sw-tab.active {
    color: #fff;
    border-bottom-color: var(--gp1);
}
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 15px;
}
h2 {
    font-size: 20px;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
@media(max-width:768px){
    .grid-2{grid-template-columns: 1fr;}
}
.btn {
    background: var(--gp1);
    color: var(--gpbg);
    border: none;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover {
    background: var(--gp2);
    color: #fff;
}
.btn-sec {
    background: var(--gp2);
    border: 1px solid rgba(0,0,0,0.15);
    color: #333;
}
.btn-sec:hover {
    background: #fafafa;
    color: #111;    
    border-color: rgba(0,0,0,0.3);
}
.btn-danger {
    background: #ff4d4d;
    color: #fff;
}
.btn-danger:hover {
    background: #e03e3e;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 13px;
}
th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
th {
    font-weight: 600;
    color: #666;
    background: #fcfcfb;
}
.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}
.badge-active {
    background: #e3f7f7;
    color: var(--gp2);
}
.badge-closed {
    background: #ffebe6;
    color: #e03e3e;
}
.badge-pending {
    background: #fff3cd;
    color: #856404;
}
.badge-pass {
    background: #d4edda;
    color: #155724;
}
.badge-fail {
    background: #f8d7da;
    color: #721c24;
}
.badge-under-review {
    background: #fff3cd;
    color: #856404;
}

/* Job Link Input Container Style */
.share-link-input-container {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 4px 6px;
    border-radius: 4px;
    max-width: 260px;
}
.share-link-url-text {
    font-size: 11px;
    font-family: monospace;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    direction: ltr;
    text-align: left;
}
.btn-mini-copy {
    background: var(--gp1);
    color: var(--gpbg);
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
}
.btn-mini-copy:hover {
    background: var(--gp2);
    color:#fff;
}
.local-warning-tag {
    font-size: 9px;
    color: #f57c00;
    display: block;
    margin-top: 2px;
}

/* Modal Responsive Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 12px;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 650px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    -webkit-overflow-scrolling: touch;
}
.modal-content.apply-modal-wide {
    max-width: 720px;
}
.modal-h {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-b {
    padding: 1.5rem;
}
.modal-f {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media(max-width:576px){
  .modal{padding:6px}
  .modal-content{max-height:96vh;border-radius:8px}
  .modal-content.apply-modal-wide{max-width:100%}
  .modal-h{padding:0.85rem 1rem}
  .modal-b{padding:1rem}
  .modal-f{flex-direction:column-reverse;gap:8px}
  .modal-f .btn{width:100%;justify-content:center}
  .grid-2{grid-template-columns:1fr !important;gap:12px !important}
}

input[type="text"], input[type="number"], input[type="tel"], input[type="email"], input[type="url"], select, textarea, input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    font-size: 13px;
    margin-top: 5px;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--gp1);
}
.lang-box {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    gap: 10px;
}
.lang-btn {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    color: #666;
}
.lang-btn.active {
    color: var(--gp1);
    font-weight: bold;
}
.rtl {
    direction: rtl;
    text-align: right;
}
.rtl th, .rtl td {
    text-align: right;
}
.rtl .modal-f {
    justify-content: flex-start;
}
.rtl .share-link-input-container {
    direction: ltr;
}

/* AI CV Reader Custom UI */
.ai-loading-container {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fafbfc;
    border-radius: 8px;
}
.ai-review-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--gp1);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.ai-review-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--gpbg);
    margin-bottom: 25px;
}
.ai-pulse-box {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 30px auto;
}
.ai-spinner-ring {
    box-sizing: border-box;
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top-color: var(--gp1);
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}
.ai-spinner-inner {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 50px;
    height: 50px;
    background: var(--gp3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gp2);
    font-size: 24px;
    animation: pulse 1.5s ease-in-out infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

.ai-steps-list {
    max-width: 340px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rtl .ai-steps-list {
    text-align: right;
}
.ai-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #777;
    transition: 0.3s;
}
.ai-step-item i {
    font-size: 18px;
}
.ai-step-item.active {
    color: var(--gp2);
    font-weight: 600;
}
.ai-step-item.completed {
    color: #2b8a3e;
}
.ai-step-item.completed i {
    color: #2b8a3e;
}
.ai-step-item.failed {
    color: #e03e3e;
    font-weight: 600;
    animation: shake 0.3s ease-in-out 2;
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.ai-error-action-zone {
    margin-top: 25px;
    display: none;
}

/* Admin Question Block Styles */
.question-builder-block {
    background: #fdfdfd;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    position: relative;
}
.question-count-badge {
    position: absolute;
    top: -10px;
    left: 15px;
    background: var(--gp2);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
}
.candidate-question-box {
    background: #f9f9f9;
    border: 1px solid #e3e3e3;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}
.required-star {
    color: red;
    margin-left: 3px;
}
.radio-group-custom {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}
.radio-group-custom label {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* Multiple Choice Option Layouts */
.admin-options-list {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.admin-option-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* File Link Styles */
.cv-download-link {
    color: var(--gp1);
    font-weight: bold;
    text-decoration: underline;
    cursor: pointer;
}
.cv-download-link:hover {
    color: var(--gp2);
}

/* Share Confirmation Toast Styling */
.toast-notice {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gp2);
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 13px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    display: none;
    animation: fadeInUp 0.3s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   JOB DETAILS SCREEN (inside app)
   ============================================================ */
.job-details-page {
    max-width: 900px;
    margin: 0 auto;
}
.back-btn {
    margin-bottom: 1rem;
    font-size: 13px;
    padding: 8px 14px;
}
.job-details-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}
.job-details-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gp2);
    margin-bottom: 10px;
}
.job-details-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}
.job-details-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.job-details-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
    margin-top: 20px;
}
.job-details-body p {
    font-size: 15px;
    color: #444;
    line-height: 1.7;
    white-space: pre-line;
}
.job-details-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Detail Tags */
.job-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}
.detail-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
}
.detail-tag.req-tag {
    background: #f0f7ff;
    color: #1864ab;
    border: 1px solid #d0ebff;
}
.detail-tag.skill-pill {
    background: var(--gp3);
    color: var(--gp2);
    border: 1px solid var(--gp4);
    font-weight: 500;
}

/* ============================================================
   JOB CARD (Candidate Grid)
   ============================================================ */
.job-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.job-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.skill-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--gp3);
    color: var(--gp2);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid var(--gp4);
}
.skill-tag-more {
    background: #f0f0f0;
    color: #888;
    border-color: #ddd;
}

/* ============================================================
   MULTI-STEP WIZARD
   ============================================================ */
.apply-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 1.2rem 1.5rem 0;
    margin-bottom: 0;
}
.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.stepper-step .stepper-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: 0.3s;
    border: 2px solid #dee2e6;
}
.stepper-step.active .stepper-circle {
    background: var(--gp1);
    color: #fff;
    border-color: var(--gp1);
    box-shadow: 0 0 0 4px rgba(0,155,164,0.15);
}
.stepper-step.completed .stepper-circle {
    background: #2b8a3e;
    color: #fff;
    border-color: #2b8a3e;
}
.stepper-step .stepper-label {
    font-size: 11px;
    color: #888;
    font-weight: 500;
    white-space: nowrap;
}
.stepper-step.active .stepper-label {
    color: var(--gp2);
    font-weight: 700;
}
.stepper-step.completed .stepper-label {
    color: #2b8a3e;
}
.stepper-line {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    margin: 0 8px;
    margin-bottom: 20px;
    max-width: 60px;
}

/* Apply Step Panels */
.apply-step-panel {
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CV Upload Zone */
.cv-upload-zone {
    border: 2px dashed #ccc;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    background: #fafafa;
    transition: 0.3s;
}
.cv-upload-zone:hover {
    border-color: var(--gp1);
    background: var(--gp3);
}

/* ============================================================
   SUCCESS MODAL
   ============================================================ */
.success-modal-content {
    max-width: 420px;
    text-align: center;
}
.success-body {
    padding: 2.5rem 2rem;
}
.success-icon-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.success-icon-wrap i {
    font-size: 48px;
    color: #2b8a3e;
    z-index: 2;
}
.success-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid #d4edda;
    animation: successPulse 2s ease-in-out infinite;
}
@keyframes successPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}
.success-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gpbg);
    margin-bottom: 12px;
}
.success-message {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.success-score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f0f7ff, #e0f5f6);
    border: 2px solid var(--gp4);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}
.success-score-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}
.success-score-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--gp2);
}
.success-score-status {
    font-size: 13px;
    font-weight: 600;
    padding: 2px 12px;
    border-radius: 12px;
    background: #fff;
}
.success-ok-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 15px;
}

/* ============================================================
   DEDICATED JOB VIEW (Standalone)
   ============================================================ */
.dedicated-job-container {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 1.5rem;
}

/* ============================================================
   REPORTS & ANALYTICS SCREEN
   ============================================================ */
.rpt-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.rpt-subtitle {
    font-size: 13px;
    color: #777;
    margin: 0;
}
.analytics-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
    .analytics-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .analytics-kpi-row { grid-template-columns: 1fr 1fr; }
}
.kpi-card {
    background: #f4f4f2;
    border-radius: 10px;
    padding: 1.1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(0,0,0,0.05);
}
.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.kpi-body { display: flex; flex-direction: column; gap: 1px; }
.kpi-label {
    font-size: 11px;
    font-weight: 500;
    color: #888;
}
.kpi-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--gp1);
    line-height: 1.1;
}

/* Report Cards */
.rpt-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.3rem 1.5rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.rpt-card-title {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    display: flex;
    align-items: center;
    gap: 8px;
}
.rpt-card-desc {
    font-size: 13px;
    color: #888;
    margin: 8px 0 12px;
}

/* Language Toggle */
.rpt-lang-toggle {
    display: flex;
    gap: 8px;
    margin: 10px 0 8px;
}
.rpt-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 6px;
    border: 2px solid #ddd;
    background: #f9f9f9;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: 0.2s;
}
.rpt-lang-btn.active {
    background: var(--gp1);
    border-color: var(--gp1);
    color: #fff;
}
.rpt-lang-hint {
    font-size: 12px;
    color: #aaa;
    margin: 0;
}

/* Columns Checkboxes */
.rpt-col-group-label {
    font-size: 11px;
    font-weight: 800;
    color: var(--gp1);
    letter-spacing: 0.6px;
    margin: 1rem 0 0.6rem;
}
.rpt-cols-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px 12px;
    margin-bottom: 0.5rem;
}
@media (max-width: 640px) {
    .rpt-cols-grid { grid-template-columns: 1fr 1fr; }
}
.rpt-col-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #eee;
    background: #fafafa;
    user-select: none;
    transition: 0.15s;
}
.rpt-col-check:hover { background: #f0f9fa; border-color: var(--gp4); }
.rpt-col-check input[type="checkbox"] {
    width: 15px; height: 15px; margin: 0; cursor: pointer;
    accent-color: var(--gp1);
    flex-shrink: 0;
}
.rpt-col-check span:first-of-type { flex: 1; font-weight: 500; }
.rpt-col-ar {
    font-size: 10px;
    color: #aaa;
    direction: rtl;
    text-align: right;
    flex-shrink: 0;
    max-width: 90px;
}

/* Download Row */
.rpt-download-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
.rpt-match-hint {
    font-size: 13px;
    color: #888;
}
.btn-export-excel {
    background: #217346;
    color: #fff;
    border: none;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(33,115,70,0.2);
}
.btn-export-excel:hover { background: #1a5c38; }
.rpt-download-btn { padding: 12px 28px; font-size: 14px; }

/* Preview Table */
.rpt-preview-badge {
    font-size: 11px;
    background: #f0f0f0;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 500;
}
.rpt-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 600px;
}
.rpt-preview-table th {
    background: #f4f6f8;
    padding: 8px 12px;
    text-align: left;
    font-weight: 700;
    color: #444;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}
.rpt-preview-table td {
    padding: 7px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rpt-preview-table tr:last-child td { border-bottom: none; }
.rpt-preview-table tr:hover td { background: #f9fdfd; }
.rpt-preview-empty {
    text-align: center;
    padding: 2rem;
    color: #aaa;
    font-size: 13px;
}
.rpt-score-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}

/* ============================================================
   MOBILE RESPONSIVE - max-width: 640px
   ============================================================ */
@media (max-width: 640px) {

    /* -- Header -- */
    .app-header         { padding: 10px 12px; gap: 6px; }
    .app-brand          { gap: 8px; }
    .app-brand h1       { font-size: 12px; line-height: 1.3; }
    .navbar-logo-img    { height: 28px; }
    #user-display-tag   { display: none; }
    .logout-btn         { padding: 5px 8px; font-size: 11px; }

    /* -- Switcher -- */
    .switcher  { padding: 0 4px; overflow-x: auto; }
    .sw-tab    { padding: 10px 12px; font-size: 11px; white-space: nowrap; }

    /* -- Container / Layout -- */
    .container       { margin: 0.75rem auto; padding: 0 10px; }
    .section-header  { flex-wrap: wrap; gap: 8px; margin-bottom: 0.75rem; }
    h2               { font-size: 15px; }
    .btn             { padding: 8px 12px; font-size: 12px; }
    #candidate-jobs-grid { grid-template-columns: 1fr !important; }

    /* -- Prevent iOS input zoom -- */
    input, select, textarea { font-size: 16px !important; }

    /* -- Card wrapper -- */
    .card { overflow: visible !important; }

    /* -- CARD TABLE -- */
    .mobile-card-table {
        display: block;
        width: 100%;
    }
    .mobile-card-table thead {
        display: none;
    }
    .mobile-card-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    .mobile-card-table tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
        background: #fff;
        border-radius: 10px;
        border: 1px solid #e0e0e0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        padding: 12px 14px;
    }
    .mobile-card-table td {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 5px 0;
        border: none !important;
        font-size: 13px;
        line-height: 1.5;
        width: 100%;
        box-sizing: border-box;
    }
    .mobile-card-table td[data-label]::before {
        content: attr(data-label);
        display: inline-block;
        min-width: 60px;
        font-size: 10px;
        font-weight: 700;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        flex-shrink: 0;
        padding-top: 2px;
    }
    .mobile-card-table td.td-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding-top: 10px;
        margin-top: 4px;
        border-top: 1px dashed #eee !important;
    }
    .mobile-card-table td.td-actions::before { display: none !important; }
    .mobile-card-table td.td-actions .btn,
    .mobile-card-table td.td-actions button {
        flex: 1;
        min-width: 80px;
        justify-content: center;
        text-align: center;
    }
    .mobile-card-table td.td-share {
        flex-direction: column;
        gap: 4px;
    }
    .mobile-card-table td.td-share::before { display: none !important; }
    .share-link-input-container { max-width: 100%; width: 100%; }

    /* -- Modals -- */
    .modal         { padding: 6px; }
    .modal-content { max-height: 96vh; border-radius: 8px; }
    .modal-h       { padding: 0.85rem 1rem; }
    .modal-b       { padding: 0.85rem; }
    .modal-f       { flex-direction: column-reverse; gap: 8px; padding: 0.85rem 1rem; }
    .modal-f .btn  { width: 100%; justify-content: center; }
    .grid-2        { grid-template-columns: 1fr !important; gap: 8px !important; }

    /* -- Auth -- */
    .auth-body   { padding: 18px 14px; }
    .auth-header { padding: 20px 14px; }

    /* -- Standalone Job View -- */
    .dedicated-job-container      { margin: 1rem auto; padding: 0 10px; }
    .job-details-card             { padding: 1.25rem 1rem; }
    .job-details-title            { font-size: 18px; }
    .job-details-meta             { gap: 10px; }
    .job-details-footer           { flex-direction: column; gap: 10px; }
    .job-details-footer .btn      { width: 100%; justify-content: center; }

    /* -- Job Details Screen (inside app) -- */
    .job-details-page             { padding: 0; }
    .job-details-page .job-details-card { padding: 1.25rem 1rem; border-radius: 8px; }
    .job-details-page .job-details-title { font-size: 18px; }
    .job-details-page .job-details-meta { gap: 8px; font-size: 12px; }
    .job-details-page .job-details-footer { flex-direction: column; }
    .job-details-page .job-details-footer .btn { width: 100%; justify-content: center; }
    .back-btn { width: 100%; justify-content: center; margin-bottom: 0.75rem; }

    /* -- AI Loader -- */
    .ai-review-title  { font-size: 16px; }
    .ai-steps-list    { max-width: 100%; }

    /* -- Stepper -- */
    .stepper-line { max-width: 30px; margin-bottom: 20px; }
    .stepper-step .stepper-label { font-size: 10px; }
    .stepper-step .stepper-circle { width: 28px; height: 28px; font-size: 12px; }

    /* -- CV Upload Zone -- */
    .cv-upload-zone { padding: 1.5rem 1rem; }
    .cv-upload-zone i { font-size: 36px !important; }

    /* -- Success Modal -- */
    .success-body { padding: 1.5rem 1rem; }
    .success-title { font-size: 18px; }
    .success-score-value { font-size: 28px; }
    .success-modal-content { max-width: 100%; }
}

@media (min-width: 641px) and (max-width: 900px) {
    .container { padding: 0 1rem; }
    .grid-2    { gap: 1rem; }
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.toggle-switch input:checked + .toggle-slider {
    background-color: var(--gp1);
}
.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}
.toggle-label {
    user-select: none;
}
