/* ==========================================
   MODERN SAAS DESIGN SYSTEM (Inter / Linear)
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-hover: #f1f5f9;
    --bg-subtle: #f8fafc;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    --border-focus: #2563eb;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-border: #bfdbfe;

    /* Semantic Status Colors */
    --status-applied-bg: #f1f5f9;
    --status-applied-text: #334155;
    --status-applied-dot: #64748b;

    --status-screening-bg: #fef3c7;
    --status-screening-text: #92400e;
    --status-screening-dot: #f59e0b;

    --status-interview-bg: #ede9fe;
    --status-interview-text: #5b21b6;
    --status-interview-dot: #8b5cf6;

    --status-offer-bg: #ecfdf5;
    --status-offer-text: #065f46;
    --status-offer-dot: #10b981;

    --status-rejected-bg: #fff1f2;
    --status-rejected-text: #9f1239;
    --status-rejected-dot: #f43f5e;

    --status-toapply-bg: #f0f9ff;
    --status-toapply-text: #0369a1;
    --status-toapply-dot: #0284c7;

    /* Layout & Elevation */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-modal: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 10px 10px -5px rgba(15, 23, 42, 0.08);

    --transition-fast: all 0.15s ease;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: #f8fafc;
    color: var(--text-primary);
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 0.9375rem;
    position: relative;
}

body.modal-open {
    overflow: hidden !important;
}

/* ==========================================
   HIGH-PERFORMANCE AMBIENT SKY BACKGROUND
   ========================================== */
.ambient-mesh-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% -10%, #e0f2fe 0%, #f0f7ff 50%, #f8fafc 100%);
    contain: strict;
    isolation: isolate;
    transform: translateZ(0);
}

.mesh-orb {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
    pointer-events: none;
    transform: translateZ(0);
}

/* Top-right airy sky blue */
.orb-1 {
    width: 650px;
    height: 650px;
    top: -150px;
    right: -80px;
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.42) 0%, rgba(96, 165, 250, 0.22) 35%, rgba(96, 165, 250, 0.05) 60%, transparent 75%);
    animation: floatOrb1 26s ease-in-out infinite alternate;
}

/* Mid-left fresh cyan / azure glow */
.orb-2 {
    width: 680px;
    height: 680px;
    top: 15%;
    left: -180px;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.32) 0%, rgba(56, 189, 248, 0.18) 40%, rgba(56, 189, 248, 0.04) 60%, transparent 75%);
    animation: floatOrb2 30s ease-in-out infinite alternate;
}

/* Bottom soft periwinkle & lavender-blue */
.orb-3 {
    width: 580px;
    height: 580px;
    bottom: -120px;
    right: 18%;
    background: radial-gradient(circle at center, rgba(129, 140, 248, 0.28) 0%, rgba(147, 197, 253, 0.15) 40%, rgba(147, 197, 253, 0.03) 60%, transparent 75%);
    animation: floatOrb3 24s ease-in-out infinite alternate;
}

/* Central bright sky glow */
.orb-4 {
    width: 520px;
    height: 520px;
    top: 40%;
    right: 35%;
    background: radial-gradient(circle at center, rgba(186, 230, 253, 0.55) 0%, rgba(125, 211, 252, 0.25) 35%, rgba(125, 211, 252, 0.05) 60%, transparent 75%);
    animation: floatOrb4 22s ease-in-out infinite alternate;
}

/* Accent deep blue glow */
.orb-5 {
    width: 460px;
    height: 460px;
    top: 8%;
    left: 30%;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.16) 0%, rgba(56, 189, 248, 0.08) 40%, transparent 70%);
    animation: floatOrb5 28s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-90px, 80px, 0) scale(1.12); }
    100% { transform: translate3d(-40px, 140px, 0) scale(0.94); }
}

@keyframes floatOrb2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(120px, -80px, 0) scale(1.15); }
    100% { transform: translate3d(60px, 90px, 0) scale(0.92); }
}

@keyframes floatOrb3 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-80px, -100px, 0) scale(1.1); }
    100% { transform: translate3d(90px, -50px, 0) scale(0.96); }
}

@keyframes floatOrb4 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(80px, 60px, 0) scale(1.2); }
    100% { transform: translate3d(-60px, -70px, 0) scale(0.9); }
}

@keyframes floatOrb5 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-70px, 90px, 0) scale(1.14); }
    100% { transform: translate3d(100px, 40px, 0) scale(0.95); }
}

@media (prefers-reduced-motion: reduce) {
    .mesh-orb {
        animation: none !important;
    }
}

/* Instantly pause background animations when any modal is open to ensure 0ms input latency */
body.modal-open .mesh-orb,
.modal-overlay.active ~ .ambient-mesh-bg .mesh-orb,
body:has(.modal-overlay.active) .mesh-orb {
    animation-play-state: paused !important;
}

/* App Container */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.bsd-text {
    text-align: right;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 0.75rem;
    margin-right: 0.25rem;
}

/* Glass Panel / Cards with Frosted Depth */
.glass-panel {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: var(--transition-fast);
}

/* ==========================================
   HEADER
   ========================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.75rem;
    background: var(--bg-surface);
}

.header-content h1 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.header-content h1 ion-icon {
    color: var(--primary);
    font-size: 1.4rem;
}

.header-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Header User Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-badge-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.user-badge-pill ion-icon {
    font-size: 1.1rem;
    color: var(--primary);
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    outline: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    transition: var(--transition-fast);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    line-height: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.55rem 1rem;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.9rem;
}

.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 0.5rem 0.9rem;
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

/* ==========================================
   METRIC STATS ROW
   ========================================== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
}

.stat-icon {
    font-size: 1.5rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.applied-icon { background: #eff6ff; color: #2563eb; }
.stat-icon.interview-icon { background: #fdf4ff; color: #c026d3; }
.stat-icon.offer-icon { background: #ecfdf5; color: #059669; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ==========================================
   DOCUMENTS & REMINDERS SECTION
   ========================================== */
.docs-container, .reminders-container {
    padding: 1.5rem;
    margin-bottom: 1.75rem;
    transition: padding 0.25s ease, margin-bottom 0.25s ease, box-shadow 0.25s ease;
}

.docs-container.section-collapsed,
.reminders-container.section-collapsed {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}

.docs-container.section-collapsed .header-flex,
.reminders-container.section-collapsed .header-flex {
    margin-bottom: 0 !important;
}

.collapsible-body {
    transition: opacity 0.2s ease;
}

.section-collapsed .collapsible-body {
    display: none !important;
}

.collapse-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.collapse-toggle-btn ion-icon {
    transition: transform 0.25s ease;
}

.section-collapsed .collapse-toggle-btn ion-icon {
    transform: rotate(180deg);
}

.collapse-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: background 0.2s, color 0.2s;
}

.section-collapsed .collapse-badge {
    background: var(--primary-subtle, rgba(99, 102, 241, 0.1));
    color: var(--primary);
    border-color: var(--primary-border, rgba(99, 102, 241, 0.25));
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.header-flex h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.header-flex h2 ion-icon {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Docs Grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.doc-card {
    padding: 1.25rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.doc-header {
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.doc-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.doc-header h3 ion-icon {
    color: var(--primary);
}

.doc-version-item {
    font-size: 0.85rem;
}

.doc-changelog {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Reminders Hub */
.reminder-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.reminder-form input {
    flex: 1;
    padding: 0.6rem 0.9rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.reminder-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reminder-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.9rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.reminder-item:hover {
    background: var(--bg-surface);
    border-color: var(--border-hover);
}

.reminder-item.completed {
    opacity: 0.55;
    background: #f8fafc;
}

.reminder-item.completed .reminder-text {
    text-decoration: line-through;
    color: var(--text-tertiary);
}

.reminder-content {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
}

.reminder-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.reminder-text {
    font-size: 0.88rem;
    color: var(--text-primary);
    font-weight: 500;
}

.reminder-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.reminder-date {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.reminder-delete-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.reminder-delete-btn:hover {
    color: #ef4444;
}

/* ==========================================
   APPLICATIONS TABLE
   ========================================== */
.table-container {
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.table-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.8rem;
    transition: var(--transition-fast);
}

.search-bar:focus-within {
    border-color: var(--primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.85rem;
    color: var(--text-primary);
    width: 160px;
}

.search-bar ion-icon {
    color: var(--text-tertiary);
    font-size: 1rem;
}

/* Dropdown Menu (Export & Backup) */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-modal);
    min-width: 230px;
    padding: 0.4rem 0;
    z-index: 1050;
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    border-radius: 0;
    transition: var(--transition-fast);
    line-height: 1.3;
}

.dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--primary);
}

.dropdown-item ion-icon {
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.35rem 0;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 0.85rem 1.25rem;
    background: var(--bg-subtle);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

th.sortable {
    cursor: pointer;
    user-select: none;
}

th.sortable:hover {
    color: var(--primary);
}

td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    color: var(--text-primary);
    vertical-align: middle;
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background-color: var(--bg-subtle);
}

/* Company Monogram Avatar */
.company-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.company-logo-wrap {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.company-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
    background: #ffffff;
    display: block;
    border-radius: var(--radius-sm);
    transition: opacity 0.2s ease;
}

.company-avatar {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-Applied {
    background: var(--status-applied-bg);
    color: var(--status-applied-text);
    border: 1px solid #e2e8f0;
}
.status-Applied::before { background: var(--status-applied-dot); }

.status-Screening {
    background: var(--status-screening-bg);
    color: var(--status-screening-text);
    border: 1px solid #fde68a;
}
.status-Screening::before { background: var(--status-screening-dot); }

.status-Interview, .status-Technical {
    background: var(--status-interview-bg);
    color: var(--status-interview-text);
    border: 1px solid #ddd6fe;
}
.status-Interview::before, .status-Technical::before { background: var(--status-interview-dot); }

.status-Offer {
    background: var(--status-offer-bg);
    color: var(--status-offer-text);
    border: 1px solid #a7f3d0;
}
.status-Offer::before { background: var(--status-offer-dot); }

.status-Rejected, .status-Not {
    background: var(--status-rejected-bg);
    color: var(--status-rejected-text);
    border: 1px solid #fecdd3;
}
.status-Rejected::before, .status-Not::before { background: var(--status-rejected-dot); }

.status-To, .status-Referral {
    background: var(--status-toapply-bg);
    color: var(--status-toapply-text);
    border: 1px solid #bae6fd;
}
.status-To::before, .status-Referral::before { background: var(--status-toapply-dot); }

/* Table Action Buttons */
.actions-wrapper {
    display: flex;
    gap: 0.25rem;
}

.action-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-tertiary);
    padding: 0.35rem;
    border-radius: var(--radius-sm);
    font-size: 1.05rem;
    transition: var(--transition-fast);
}

.action-btn:hover {
    background: var(--bg-surface);
    border-color: var(--border-color);
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

/* Helpers hidden by default on desktop for 100% desktop fidelity */
.cell-meta-icon {
    display: none;
}

.mobile-action-label {
    display: none;
}

.desktop-only-summary-dash {
    color: var(--text-tertiary);
}

.summary-container {
    max-width: 280px;
}

.summary-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.82rem;
    line-height: 1.4;
    white-space: normal;
}

.summary-text.expanded {
    -webkit-line-clamp: unset;
}

.read-more-btn {
    color: var(--primary);
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
    margin-top: 2px;
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* ==========================================
   DEMO BANNER & ONBOARDING GUIDE
   ========================================== */
.demo-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-md);
    animation: fadeIn 0.3s ease;
}

.demo-banner-content {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.demo-banner-badge {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.demo-banner-content strong {
    display: block;
    font-size: 0.92rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.demo-banner-content p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.clear-demo-btn {
    white-space: nowrap;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    color: #dc2626 !important;
    border-color: #fecaca !important;
    background: #fff !important;
}

.clear-demo-btn:hover {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
}

.empty-state {
    padding: 2.5rem 1.25rem 2rem;
    text-align: center;
}

.empty-state-header {
    max-width: 580px;
    margin: 0 auto 2rem;
}

.empty-icon-wrapper {
    width: 52px;
    height: 52px;
    margin: 0 auto 0.75rem;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.empty-state h3 {
    font-size: 1.35rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.empty-state p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.onboarding-guide {
    max-width: 960px;
    margin: 0 auto 2rem;
    text-align: start;
}

.onboarding-guide-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.onboarding-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.step-card {
    position: relative;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.step-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.step-card.highlight-step {
    border-color: #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.06);
}

.step-badge {
    position: absolute;
    top: -10px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
}

html[dir="ltr"] .step-badge {
    right: auto;
    left: 12px;
}

.step-icon {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
}

.step-card.highlight-step .step-icon {
    color: #10b981;
}

.step-card.highlight-step .step-badge {
    background: #10b981;
}

.step-card h5 {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    line-height: 1.35;
}

.step-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
    text-align: start;
}

.empty-state-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.load-demo-btn {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
    padding: 0.65rem 1.25rem !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

.load-demo-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35) !important;
}

/* ==========================================
   MODALS
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.62);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease-out;
    padding: 2rem 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    width: 100%;
    max-width: 620px;
    max-height: none;
    margin: auto;
    padding: 1.75rem;
    transform: scale(0.96);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    font-size: 1.25rem;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.close-btn:hover {
    color: var(--text-primary);
    background: var(--bg-subtle);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 0.6rem 0.8rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-primary);
    transition: border-color 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* Password Input Wrapper & Toggle Button */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 2.5rem !important;
}

[dir="rtl"] .password-input-wrapper input {
    padding-right: 0.8rem !important;
    padding-left: 2.5rem !important;
}

.toggle-password-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.35rem;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    border-radius: var(--radius-sm);
    transition: color 0.2s ease, background 0.2s ease;
    z-index: 2;
}

[dir="rtl"] .toggle-password-btn {
    right: auto;
    left: 0.5rem;
}

.toggle-password-btn:hover {
    color: var(--primary);
    background: var(--bg-hover);
}

/* Instant Placeholder Disappearance On Focus */
input::placeholder,
textarea::placeholder {
    transition: opacity 0.15s ease, color 0.15s ease;
}

input:focus::placeholder,
textarea:focus::placeholder {
    opacity: 0 !important;
    color: transparent !important;
}

.synthesis-section {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.synthesis-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.85rem;
}

/* View Mode Details */
#view-body-content,
.view-body,
#viewBodyContent {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

#view-body-content .view-grid,
.view-body .view-grid,
#viewBodyContent .view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

#view-body-content .view-section,
.view-body .view-section,
#viewBodyContent .view-section {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

#view-body-content h3,
.view-body h3,
#viewBodyContent h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary); /* Bold Solid Black */
    margin: 0;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
}

#view-body-content p,
.view-body p,
#viewBodyContent p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    word-break: break-word;
    white-space: pre-wrap;
}

.prep-box {
    margin-top: 0.35rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    line-height: 1.6;
}

.prep-box h3 {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.prep-box p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.prep-box.must {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.prep-box.good {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.prep-box.pitch {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* ==========================================
   AUTH CARD
   ========================================== */
.auth-card {
    max-width: 400px;
    padding: 2.25rem 2rem;
    text-align: center;
    border-radius: var(--radius-lg);
}

.auth-header {
    margin-bottom: 1.5rem;
}

.auth-icon-wrap {
    width: 50px;
    height: 50px;
    margin: 0 auto 0.85rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.auth-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.auth-header p {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    line-height: 1.4;
}

.google-auth-btn {
    width: 100%;
    padding: 0.65rem 1rem;
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: var(--transition-fast);
    margin-bottom: 0.5rem;
}

.google-auth-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1rem 0;
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 0.6rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.auth-tabs {
    display: flex;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 2px;
    margin-bottom: 1.25rem;
}

.auth-tab {
    flex: 1;
    padding: 0.45rem;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: calc(var(--radius-sm) - 2px);
    cursor: pointer;
    transition: var(--transition-fast);
}

.auth-tab.active {
    background: var(--bg-surface);
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

.auth-submit-btn {
    width: 100%;
    margin-top: 0.75rem;
    padding: 0.65rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-top: 0.6rem;
    text-align: left;
}

.auth-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-top: 0.6rem;
    text-align: left;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
/* ==========================================
   RESPONSIVE DESIGN & MOBILE CARD VIEW
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0.75rem 0.6rem 3.5rem;
    }

    /* Main Header */
    .main-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.15rem 1rem;
        margin-bottom: 1.25rem;
    }

    .header-content {
        text-align: left;
    }

    .header-content h1 {
        font-size: 1.25rem;
    }

    .header-actions {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .header-actions .btn-primary {
        flex: 1;
        justify-content: center;
        padding: 0.65rem 1rem;
    }

    .user-badge {
        flex-wrap: wrap;
        width: 100%;
        justify-content: space-between;
    }

    /* Metric Stats Cards */
    .stats-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .stat-card {
        padding: 0.9rem 1.1rem;
        gap: 0.85rem;
    }

    .stat-value {
        font-size: 1.55rem;
    }

    /* Documents & Reminders */
    .docs-container, .reminders-container {
        padding: 1.15rem 1rem;
        margin-bottom: 1.25rem;
    }

    .docs-grid {
        grid-template-columns: 1fr;
    }

    .reminder-form {
        flex-direction: column;
        gap: 0.5rem;
    }

    .reminder-form button {
        width: 100%;
        padding: 0.65rem;
        justify-content: center;
    }

    /* Table Container & Header */
    .table-container {
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .table-header {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        padding: 1.15rem 1rem;
        margin-bottom: 1rem;
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        box-shadow: var(--shadow-sm);
    }

    .table-header h2 {
        font-size: 1.15rem;
    }

    .table-header > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-left: 0 !important;
    }

    .status-filters {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
    }

    .search-bar {
        width: 100%;
    }

    .search-bar input {
        width: 100%;
    }

    .dropdown-container {
        width: 100%;
    }

    .table-header #exportDropdownBtn {
        width: 100%;
        justify-content: center;
        padding: 0.65rem 1rem;
    }

    .dropdown-menu {
        width: 100%;
        min-width: 100%;
        right: 0;
        left: 0;
    }

    /* ==========================================
       CARD VIEW TRANSFORMATION (MOBILE ONLY)
       ========================================== */
    .table-responsive {
        overflow-x: visible;
        width: 100%;
    }

    .table-responsive table {
        display: block;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .table-responsive thead {
        display: none; /* Hide traditional table header on phone */
    }

    .table-responsive tbody {
        display: flex;
        flex-direction: column;
        gap: 0.85rem;
        width: 100%;
    }

    /* Individual Card */
    #jobsList tr.job-row-card {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "company status"
            "title   title"
            "location date"
            "summary summary"
            "actions actions";
        gap: 0.6rem 0.5rem;
        padding: 1.15rem 1rem;
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-sm);
        transition: var(--transition-fast);
    }

    #jobsList tr.job-row-card:hover {
        background: var(--bg-surface);
        box-shadow: var(--shadow-md);
        border-color: var(--border-hover);
    }

    /* Card Cells Reset & Alignment */
    .cell-company {
        grid-area: company;
        padding: 0 !important;
        border: none !important;
        align-self: center;
    }

    .cell-company .company-name {
        font-size: 0.95rem;
    }

    .cell-status {
        grid-area: status;
        padding: 0 !important;
        border: none !important;
        align-self: center;
        justify-self: end;
    }

    .cell-title {
        grid-area: title;
        padding: 0.15rem 0 0 !important;
        border: none !important;
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--text-primary);
        line-height: 1.35;
    }

    .cell-location {
        grid-area: location;
        padding: 0 !important;
        border: none !important;
        font-size: 0.82rem;
        color: var(--text-secondary);
        align-self: center;
    }

    .cell-date {
        grid-area: date;
        padding: 0 !important;
        border: none !important;
        font-size: 0.82rem;
        color: var(--text-secondary);
        align-self: center;
        justify-self: end;
    }

    .cell-meta-icon {
        display: inline-block;
        font-size: 0.92rem;
        vertical-align: -2px;
        color: var(--text-tertiary);
        margin-right: 3px;
    }

    .cell-summary {
        grid-area: summary;
        padding: 0 !important;
        border: none !important;
    }

    .cell-summary .summary-container {
        max-width: 100%;
        background: var(--bg-subtle);
        padding: 0.65rem 0.85rem;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border-color);
        margin-top: 0.2rem;
    }

    .cell-summary .summary-text {
        font-size: 0.82rem;
        color: var(--text-secondary);
    }

    .desktop-only-summary-dash {
        display: none;
    }

    /* Actions Footer inside Card */
    .cell-actions {
        grid-area: actions;
        padding: 0 !important;
        border: none !important;
        margin-top: 0.35rem;
        padding-top: 0.85rem !important;
        border-top: 1px solid var(--border-color) !important;
    }

    .actions-wrapper {
        display: flex;
        gap: 0.6rem;
        width: 100%;
    }

    .actions-wrapper .action-btn {
        flex: 1;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        padding: 0.65rem 0.85rem;
        border-radius: var(--radius-sm);
        font-size: 0.85rem;
        font-weight: 600;
        min-height: 42px; /* Touch-friendly tap target */
        cursor: pointer;
    }

    .actions-wrapper .view-action-btn {
        background: var(--primary-light);
        color: var(--primary);
        border: 1px solid var(--primary-border);
    }

    .actions-wrapper .view-action-btn:hover,
    .actions-wrapper .view-action-btn:active {
        background: var(--primary);
        color: white;
    }

    .actions-wrapper .archive-action-btn {
        background: var(--bg-subtle);
        color: var(--text-secondary);
        border: 1px solid var(--border-color);
        flex: 0 0 auto;
        padding: 0.65rem 0.95rem;
    }

    .mobile-action-label {
        display: inline;
    }

    /* Modals & Forms on Mobile */
    .modal-overlay {
        padding: 1rem 0.6rem;
        align-items: flex-start;
    }

    .modal-content {
        padding: 1.35rem 1.1rem;
        max-height: none;
        width: 100%;
        max-width: 100%;
        margin: auto;
        border-radius: var(--radius-lg);
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    #view-body-content,
    .view-body,
    #viewBodyContent {
        gap: 1.25rem;
    }

    #view-body-content .view-grid,
    .view-body .view-grid,
    #viewBodyContent .view-grid {
        grid-template-columns: 1fr;
        gap: 1.1rem;
        padding-bottom: 1.1rem;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }

    .empty-state {
        background: var(--bg-surface);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-lg);
        padding: 2.5rem 1.25rem;
        box-shadow: var(--shadow-sm);
    }

    .ai-assistant-box {
        padding: 1rem 0.85rem !important;
    }
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}
.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

/* ==========================================
   LANGUAGE TOGGLE & FEEDBACK STYLES
   ========================================== */
.lang-toggle-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.lang-toggle-btn:hover {
    background: var(--bg-surface-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.feedback-thumb-btn {
    transition: var(--transition-fast);
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.feedback-thumb-btn.active-positive {
    background: var(--status-offer-bg) !important;
    color: var(--status-offer-text) !important;
    border-color: var(--status-offer-dot) !important;
    font-weight: 600;
}

.feedback-thumb-btn.active-negative {
    background: var(--status-rejected-bg) !important;
    color: var(--status-rejected-text) !important;
    border-color: var(--status-rejected-dot) !important;
    font-weight: 600;
}

/* ==========================================
   RTL (RIGHT-TO-LEFT) SUPPORT
   ========================================== */
html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
    font-family: 'Rubik', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html[dir="rtl"] .main-header .header-actions {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .modal-header .close-btn {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .search-bar ion-icon {
    left: auto;
    right: 0.75rem;
}

html[dir="rtl"] .search-bar input {
    padding-left: 0.75rem;
    padding-right: 2.25rem;
}

html[dir="rtl"] .dropdown-menu {
    right: auto;
    left: 0;
}

html[dir="rtl"] .status-dot {
    margin-right: 0;
    margin-left: 0.4rem;
}

html[dir="rtl"] .stat-card {
    text-align: right;
}

html[dir="rtl"] .stat-card .stat-icon {
    margin-right: 0;
    margin-left: 1rem;
}

html[dir="rtl"] input[dir="ltr"],
html[dir="rtl"] textarea[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

html[dir="rtl"] th.sortable ion-icon {
    margin-left: 0;
    margin-right: 0.35rem;
}

html[dir="rtl"] #jobsTable th,
html[dir="rtl"] #jobsTable td {
    text-align: right;
}

html[dir="rtl"] #jobsTable th:last-child,
html[dir="rtl"] #jobsTable td:last-child {
    text-align: left;
}

