:root {
    /* Primary Color Palette */
    --color-primary-dark: #1E3A8A;
    --color-primary: #3B82F6;
    --color-primary-light: #DBEAFE;

    /* Neutral Grays */
    --color-white: #FFFFFF;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-black: #000000;

    /* Status Colors */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #06B6D4;

    /* Typography */
    --font-family-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* Font Sizes */
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 20px;
    --font-size-2xl: 24px;
    --font-size-3xl: 32px;
    --font-size-4xl: 48px;

    /* Spacing */
    --spacing-1: 4px;
    --spacing-2: 8px;
    --spacing-4: 16px;
    --spacing-6: 24px;
    --spacing-8: 32px;
    --spacing-12: 48px;
    --spacing-16: 64px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
}

/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-family: var(--font-family-sans);
    scroll-behavior: smooth;
    height: 100%;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    background-color: var(--color-gray-50);
    color: var(--color-gray-800);
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

ul,
ol {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
    font-weight: var(--font-weight-bold);
}

/* Modern Professional Recruiter Dashboard Design */

body {
    background-color: #f8fafc;
}

.hero-section {
    padding: 30px 40px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.hero-content {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    text-align: center;
}

.hero-logo img {
    height: 110px;
    width: auto;
    object-fit: contain;
}

.hero-text {
    flex-grow: 1;
    min-width: 280px;
}

.hero-section h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.hero-section p {
    font-size: 1.25rem;
    color: #475569;
    font-weight: 600;
    margin: 0;
}

.dashboard-container {
    max-width: 100%;
    margin: 20px 20px 60px;
    padding: 0 16px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    font-size: 2rem;
    color: #0f172a;
    font-weight: 800;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box ion-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
}

.search-box input {
    padding: 10px 16px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 300px;
    height: 44px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.filter-select {
    height: 50px;
    padding: 0 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background-color: white;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 24px;
    gap: 20px;
    justify-content: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .hero-section {
        padding: 20px 16px;
    }

    .hero-content {
        justify-content: center;
    }

    .hero-logo img {
        height: 80px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-section h1 {
        font-size: 1.6rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .dashboard-container {
        margin: 10px 10px 40px;
        padding: 0 8px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 20px;
    }

    .page-header h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
        height: 48px;
    }

    .filter-select {
        width: 100%;
        height: 48px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    #hero-logout-btn,
    .btn {
        width: 100%;
        justify-content: center;
    }
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 4px;
    text-align: center;
}

.stat-info p {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    text-align: center;
}

/* Responsive Table: Converts to Cards below 1024px */
@media (max-width: 1024px) {
    .table-container {
        overflow-x: hidden;
    }

    .table thead {
        display: none;
        /* Hide standard headers */
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100% !important;
    }

    .table tr.table-row {
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        margin-bottom: 24px;
        padding: 20px;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        position: relative;
    }

    .table td.table-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid #f1f5f9;
        text-align: right;
        font-size: 1rem;
    }

    .table td.table-cell:last-child {
        border-bottom: none;
        padding-top: 16px;
        justify-content: center;
        gap: 12px;
    }

    .table td.table-cell::before {
        content: attr(data-label);
        font-weight: 700;
        text-align: left;
        color: #64748b;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-right: 16px;
    }

    /* Column Specific Adjustments in Card View */
    .table td[data-label="Email ID"] span {
        font-size: 0.95rem !important;
        word-break: break-all;
    }

    .table td[data-label="Actions"] {
        flex-direction: row;
        border-top: 2px solid #f1f5f9;
        margin-top: 12px;
    }

    /* Details row spacing in card view */
    .expanded-content {
        padding: 20px !important;
        border-radius: 0 0 16px 16px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .horizontal-timeline {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
        gap: 30px;
    }

    .timeline-connector {
        display: none;
    }

    .timeline-step {
        flex-direction: row;
        align-items: center;
        gap: 20px;
        width: 100%;
        justify-content: flex-start;
    }

    .timeline-info {
        text-align: left;
        margin-top: 0;
        max-width: none;
    }
}

/* Table Specifics */
.table-card {
    margin-top: 20px;
}

.table-container {
    width: 100%;
    margin-top: 20px;
}

.table {
    width: 100% !important;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    font-size: 1.15rem;
    font-weight: 600;
}

/* Balance Column Widths for Recruiter Dashboard */
.table th:nth-child(1),
.table td:nth-child(1) {
    width: 100px;
}

/* submission ID */
.table th:nth-child(2),
.table td:nth-child(2) {
    width: auto;
}

/* Candidate Name/Info (Flexible) */
.table th:nth-child(3),
.table td:nth-child(3) {
    width: 250px;
}

/* Job Title */
.table th:nth-child(4),
.table td:nth-child(4) {
    width: 180px;
}

/* Status */
.table th:nth-child(5),
.table td:nth-child(5) {
    width: 150px;
}

/* Actions if any */

.table th {
    background: #f8fafc;
    color: #0f172a;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.1rem;
    /* Increased from 0.95 */
    letter-spacing: 0.05em;
    padding: 16px 20px;
    border-bottom: 2px solid #e2e8f0;
}

.table-cell {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.email-status {
    display: flex;
    gap: 8px;
    font-size: 1.1rem;
}

.badge {
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    display: inline-block;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background: #e0f2fe;
    color: #075985;
}

/* Timeline */
.expanded-content {
    background-color: #f8fafc;
    padding: 30px;
}

.timeline {
    position: relative;
    border-left: 2px solid #e2e8f0;
    padding-left: 30px;
    margin-left: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -37px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #cbd5e1;
    border: 3px solid white;
}

.timeline-item.completed::before {
    background-color: #3b82f6;
}

.timeline-title {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.timeline-date {
    font-size: 0.8rem;
    color: #64748b;
}

/* Expanded Row Styling */
.details-row {
    background-color: #f8fafc;
}

.expanded-content {
    padding: 30px 40px !important;
    border-bottom: 2px solid #e2e8f0;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.details-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.email-details-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.email-detail-item {
    background: white;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.email-detail-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.email-info strong {
    display: block;
    font-size: 0.95rem;
    color: #1e293b;
    margin-bottom: 4px;
}

.email-info p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0;
}

.email-status-detailed {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.sent {
    background-color: #22c55e;
}

.status-dot.failed {
    background-color: #ef4444;
}

.status-dot.scheduled {
    background-color: #f59e0b;
}

.status-dot.empty {
    background-color: #cbd5e1;
}

/* Horizontal Timeline Styling */
.horizontal-timeline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin: 40px 0;
    position: relative;
    padding: 0 20px;
}

.timeline-connector {
    position: absolute;
    top: 15px;
    left: 40px;
    right: 40px;
    height: 3px;
    background-color: #e2e8f0;
    z-index: 0;
}

.timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #94a3b8;
    transition: all 0.3s;
}

.timeline-step.completed .timeline-dot {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #fff;
}

.timeline-step.active .timeline-dot {
    border-color: #3b82f6;
    color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.timeline-step.rejected .timeline-dot {
    border-color: #ef4444;
    background: #ef4444;
    color: #fff;
}

.timeline-step.skipped .timeline-connector {
    background-color: #f1f5f9;
}

.timeline-dot ion-icon {
    font-size: 1.25rem;
}

.timeline-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: #475569;
    text-align: center;
}

.timeline-step.completed .timeline-label {
    color: #1e293b;
}

.timeline-info {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: -8px;
    text-align: center;
    max-width: 120px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-top: 1px solid #f1f5f9;
}

.pagination-info {
    font-size: 0.875rem;
    color: #64748b;
}

.pagination-controls {
    display: flex;
    gap: 8px;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.page-btn.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .pagination-container {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
        text-align: center;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
    }
}

/* Highlight */
.highlight {
    background-color: #fef08a;
    padding: 0 2px;
    border-radius: 2px;
}

/* Action Buttons Alignment */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
}

/* Interview Actions Alignment */
.interview-actions {
    display: flex;
    gap: 8px;
    white-space: nowrap;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-delete:hover {
    background-color: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999 !important;
}

.modal-content {
    background: white;
    padding: 32px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 800;
    margin: 0;
}

.modal-header p {
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    color: #1e293b;
    transition: all 0.2s;
    background: #f8fafc;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.btn-cancel {
    background: white;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.btn-confirm {
    background: #3b82f6;
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.btn-confirm:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.5);
}

.btn-confirm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Premium Notifications & Modals */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 24px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    border-left: 6px solid #3b82f6;
    min-width: 320px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-success {
    border-left-color: #10b981;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: #10b981;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-message {
    font-weight: 700;
    color: #1e293b;
    font-size: 14px;
}

/* Premium Confirm Modal */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.confirm-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.confirm-container {
    background: #ffffff;
    border-radius: 24px;
    width: 90%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: center;
}

.confirm-overlay.open .confirm-container {
    transform: scale(1);
}

.confirm-icon {
    width: 64px;
    height: 64px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
}

.confirm-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.confirm-text {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 32px;
    line-height: 1.6;
    font-weight: 500;
}

.confirm-actions {
    display: flex;
    gap: 12px;
}

.confirm-actions .btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
}