/* ========== GLOBAL STYLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* ========== LANDING PAGE ========== */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.header {
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.options-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    width: 100%;
}

.option-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow-lg);
}

.option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.option-card h2 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

.option-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

footer {
    margin-top: 3rem;
    color: white;
    text-align: center;
    opacity: 0.8;
}

/* ========== BUTTONS ========== */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-full {
    width: 100%;
}

/* ========== LOGIN PAGE ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 450px;
    width: 100%;
}

.login-card h1 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.login-card p {
    color: var(--secondary-color);
    margin-bottom: 2rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer p {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* ========== FORMS ========== */
.form-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--secondary-color);
}

form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.form-section {
    padding: 1rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* ========== MESSAGES ========== */
.message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
    display: none;
}

.message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    display: block;
}

.message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

/* ========== DASHBOARD ========== */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #1e293b;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.nav-item span {
    font-size: 1.2rem;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.logout-btn {
    display: block;
    padding: 0.75rem 1rem;
    background: var(--danger-color);
    color: white;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #dc2626;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.content-header h1 {
    color: var(--text-color);
}

.user-info {
    color: var(--secondary-color);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card.clickable {
    cursor: pointer;
}

.stat-card.clickable:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 3rem;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* ========== JOB CODES SECTION ========== */
.job-codes-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.job-codes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.job-code-card {
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.job-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.job-code-header h4 {
    margin: 0;
    color: var(--text-color);
}

.btn-icon-delete {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
}

.job-code-text {
    font-weight: 600;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.job-code-desc {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
}

/* ========== WIDE TABLE ========== */
.table-container-wide {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    max-width: 100%;
}

.wide-table {
    width: 100%;
    min-width: 2000px;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.wide-table th,
.wide-table td {
    padding: 0.75rem;
    text-align: left;
    white-space: nowrap;
}

.table-controls {
    margin-bottom: 1rem;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-registered {
    background: #e0e7ff;
    color: #3730a3;
}

.status-shortlisted {
    background: #fef3c7;
    color: #92400e;
}

.status-interviewed {
    background: #dbeafe;
    color: #1e40af;
}

.status-selected {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-on {
    background: #f3f4f6;
    color: #374151;
}

/* ========== TABLE ========== */
.table-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--primary-color);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background: #f1f5f9;
}

.action-btn {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: opacity 0.3s;
}

.action-btn:hover {
    opacity: 0.8;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
}

.btn-delete {
    background: var(--danger-color);
    color: white;
}

/* ========== SEARCH & FILTERS ========== */
.search-filters {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background: white;
    margin: 2rem auto;
    padding: 0;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    box-shadow: var(--shadow-lg);
}

.modal-content.modal-large {
    max-width: 1200px;
    width: 95%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
}

.close {
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-color);
}

.modal form {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}

/* ========== RECENT CANDIDATES ========== */
.recent-candidates {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.recent-candidates h2 {
    margin-bottom: 1rem;
}

.candidate-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.candidate-item:last-child {
    border-bottom: none;
}

.candidate-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.candidate-item p {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .options-container {
        grid-template-columns: 1fr;
    }
}