/* ==================== */
/* Premium Professional Design System */
/* Minimal, Classy, Sleek */
/* ==================== */

/* Import Premium Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Minimal Professional Color Palette - Deep Navy & Emerald */
    --primary-color: #0f172a;
    /* Deep Navy */
    --primary-light: #1e293b;
    --accent-color: #10b981;
    /* Emerald Green */
    --accent-hover: #059669;
    --accent-light: #d1fae5;

    /* Secondary Accents */
    --secondary-color: #6366f1;
    /* Indigo */
    --secondary-light: #818cf8;
    --warning-color: #f59e0b;
    /* Amber */
    --danger-color: #ef4444;
    /* Red */
    --info-color: #3b82f6;
    /* Blue */

    /* Neutral Grays - Sophisticated */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Gradients - Minimal & Classy */
    --gradient-primary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.95) 100%);

    /* Spacing - Professional Scale */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius - Sleek & Modern */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows - Subtle & Professional */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* Transitions - Smooth & Polished */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== */
/* Base Styles */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==================== */
/* Header - Minimal & Professional */
/* ==================== */

.app-header {
    background: var(--white);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--gray-200);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 1.75rem;
    color: var(--accent-color);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.header-nav {
    display: flex;
    gap: 0.75rem;
}

/* ==================== */
/* Buttons - Premium & Interactive */
/* ==================== */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn i {
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-600);
    border: 1.5px solid var(--gray-300);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.btn-icon i {
    font-size: 1rem;
}

.btn-icon:hover {
    background: var(--gray-900);
    color: var(--white);
    border-color: var(--gray-900);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-icon:hover::before {
    display: none;
}

/* ==================== */
/* Main Container */
/* ==================== */

.main-container {
    padding: 2.5rem 0;
}

/* ==================== */
/* Dashboard Stats - Minimal Cards */
/* ==================== */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--white);
    padding: 1.75rem 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.5rem;
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: 0.375rem;
    letter-spacing: -0.025em;
}

.stat-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
}

/* ==================== */
/* Filters Section - Clean & Minimal */
/* ==================== */

.filters-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 0.75rem 0.75rem 2.75rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--gray-900);
    background: var(--white);
    transition: all var(--transition-normal);
}

.search-box input::placeholder {
    color: var(--gray-400);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.filter-controls {
    display: flex;
    gap: 0.75rem;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-select:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ==================== */
/* Applications Section - Professional */
/* ==================== */

.applications-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 2px solid var(--gray-100);
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.results-count {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

/* ==================== */
/* Table - Clean & Professional */
/* ==================== */

.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.applications-table {
    width: 100%;
    min-width: 1000px;
    border-collapse: collapse;
}

.applications-table thead {
    background: var(--gray-900);
}

.applications-table th {
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.applications-table th:first-child {
    border-top-left-radius: var(--radius-lg);
    padding-left: 2rem;
}

.applications-table th:last-child {
    border-top-right-radius: var(--radius-lg);
    padding-right: 2rem;
}

.applications-table tbody tr {
    background: var(--white);
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--gray-100);
}

.applications-table tbody tr:hover {
    background: var(--gray-50);
}

.applications-table td {
    padding: 1.25rem 1.5rem;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.applications-table td:first-child {
    padding-left: 2rem;
}

.applications-table td:last-child {
    padding-right: 2rem;
    text-align: center;
}

.company-cell {
    font-weight: 700;
    color: var(--gray-900);
    font-size: 1rem;
}

.position-cell {
    color: var(--gray-700);
    font-weight: 600;
}

.location-cell {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ==================== */
/* Status Badges - Minimal & Sleek */
/* ==================== */

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.status-applied {
    background: #dbeafe;
    color: #1e40af;
}

.status-interview {
    background: #fef3c7;
    color: #92400e;
}

.status-offer {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-withdrawn {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* ==================== */
/* Actions */
/* ==================== */

.actions-cell {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

/* ==================== */
/* Empty State */
/* ==================== */

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

.empty-state i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.empty-state p {
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ==================== */
/* Modal - Premium */
/* ==================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-2xl);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--gray-200);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--gray-100);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

.close-btn {
    background: var(--gray-100);
    border: none;
    font-size: 1.25rem;
    color: var(--gray-500);
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
}

.close-btn:hover {
    background: var(--gray-900);
    color: var(--white);
}

/* ==================== */
/* Form - Clean & Professional */
/* ==================== */

#jobForm {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

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

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--gray-900);
    background: var(--white);
    transition: all var(--transition-normal);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 2rem;
    border-top: 2px solid var(--gray-100);
    background: var(--gray-50);
}

/* ==================== */
/* Details Content */
/* ==================== */

.details-content {
    padding: 2rem;
}

.detail-row {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--accent-color);
}

.detail-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 1rem;
    color: var(--gray-900);
    font-weight: 600;
}

.detail-value a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
}

.detail-value a:hover {
    text-decoration: underline;
}

/* ==================== */
/* Toast - Minimal */
/* ==================== */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--gray-900);
    color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2xl);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(500px);
    transition: transform var(--transition-normal);
    z-index: 2000;
    min-width: 300px;
    border: 1px solid var(--gray-700);
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.25rem;
    color: var(--accent-color);
}

.toast span {
    font-weight: 600;
    font-size: 0.9375rem;
}

/* ==================== */
/* Scrollbar - Minimal & Sleek */
/* ==================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-600);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-400) var(--gray-100);
}

/* ==================== */
/* Responsive Design */
/* ==================== */

@media (max-width: 1200px) {
    .applications-table {
        min-width: 900px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .header-nav {
        width: 100%;
    }

    .header-nav .btn {
        flex: 1;
        justify-content: center;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .filters-section {
        flex-direction: column;
    }

    .search-box {
        min-width: auto;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }

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

    .applications-table {
        min-width: 800px;
    }

    .modal-content {
        width: 95%;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        min-width: auto;
    }
}

/* ==================== */
/* Animations - Smooth & Professional */
/* ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.filters-section,
.applications-section {
    animation: fadeIn 0.4s ease-out;
}

.stat-card:nth-child(1) {
    animation-delay: 0.05s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.15s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.2s;
}

/* ==================== */
/* Selection & Focus States */
/* ==================== */

::selection {
    background: var(--accent-light);
    color: var(--gray-900);
}

:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}