/* ==========================================================================
   MINIMALIST DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root[data-theme="dark"] {
    --bg-primary: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: #1f2937;
    --border-color: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.1);
    --secondary: #10b981;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --input-bg: #111827;
}

:root[data-theme="light"] {
    --bg-primary: #f9fafb;
    --bg-secondary: #f3f4f6;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.05);
    --secondary: #059669;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --input-bg: #ffffff;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hide background blobs in HTML by setting display to none */
.blob {
    display: none;
}

/* ==========================================================================
   TYPOGRAPHY & CARDS
   ========================================================================== */
h1, h2, h3, h4 {
    font-weight: 600;
    color: var(--text-primary);
}

.gradient-text {
    color: var(--primary);
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
/* ==========================================================================
   SCROLLING TICKER
   ========================================================================== */
.announcement-bar {
    background: var(--primary-glow);
    border-bottom: 1px solid var(--border-color);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    overflow: hidden;
    padding: 0.6rem 0;
    width: 100%;
    white-space: nowrap;
}

.ticker-text {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}

@keyframes ticker-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

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

.nav-btn.active {
    color: var(--primary);
    background: var(--primary-glow);
}

.theme-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

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

/* Theme Icon toggling */
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: block; }
[data-theme="light"] .icon-moon { display: none; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

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

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   MAIN LAYOUT & HOME
   ========================================================================== */
.main-content {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.25s ease-out;
}

.tab-content.active {
    display: block;
}

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

.hero-section {
    text-align: center;
    padding: 4rem 0 2rem 0;
    max-width: 700px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   PORTALS - EMPLOYEE
   ========================================================================== */
.portal-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.5rem;
}

@media (max-width: 900px) {
    .portal-grid {
        grid-template-columns: 1fr;
    }
}

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

.card-header h2 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.input-wrapper input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.2rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.input-wrapper input:focus,
textarea:focus {
    border-color: var(--primary);
}

textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    resize: vertical;
}

.form-hint {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.sticky-wrapper h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   CANDIDATE PROFILE CARDS
   ========================================================================== */
.profile-card {
    position: relative;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--primary-glow);
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.card-avatar {
    width: 44px;
    height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card-name {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.card-title {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.card-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.skill-tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.card-bio {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 38px;
}

.preview-card {
    border-style: dashed;
}

/* ==========================================================================
   PORTALS - EMPLOYER
   ========================================================================== */
.search-filter-bar {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.filter-row-main {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.search-box {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 0.6rem 0.75rem 0.6rem 2.2rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.filter-item label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.filter-item select {
    padding: 0.5rem;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    outline: none;
    font-size: 0.85rem;
}

.filter-item input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    outline: none;
}

.filter-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
}

.section-header {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.1rem;
}

.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.btn-bookmark {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
}

.btn-bookmark.active {
    color: var(--primary);
}

.card-footer-actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: auto;
    gap: 0.5rem;
}

.card-footer-actions .btn {
    flex: 1;
    padding: 0.4rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   MODAL DIALOG (DETAILED VIEW)
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 550px;
    position: relative;
    padding: 1.5rem;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-header-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.modal-avatar {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.modal-header-info h2 {
    font-size: 1.3rem;
}

.modal-header-info p {
    font-size: 0.9rem;
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.modal-stat-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.modal-stat-box .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.modal-stat-box .value {
    font-size: 0.85rem;
    font-weight: 600;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.modal-section p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.5;
}

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

/* ==========================================================================
   NOTIFICATION SYSTEM (TOAST)
   ========================================================================== */
.toast {
    position: fixed;
    bottom: 2rem;
    right: -300px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    color: var(--text-primary);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-weight: 500;
    font-size: 0.85rem;
    z-index: 300;
    transition: right 0.3s ease;
}

.toast.active {
    right: 2rem;
}
