/* 
  Career Portal System - Main Stylesheet 
  Updated for "4POINT2 TECH" UI
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #FF3B30;
    --primary-bg: #FFF0F0;
    --text-dark: #1C1C1E;
    --text-gray: #8E8E93;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;
    --radius: 20px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-light);
    padding: 30px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1001;
    /* Above fixed header if they overlap */
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.sidebar-logo img {
    height: 50px;
    width: auto;
}

.sidebar-logo span {
    font-size: 20px;
    font-weight: 800;
    color: #1C1C1E;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 110px 40px 40px 40px !important;
    /* Space for fixed header */
    transition: 0.3s;
}

/* Sidebar */
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 12px;
    color: var(--text-gray);
    font-weight: 500;
    transition: 0.2s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary);
    background: #e3e3e3;
    box-shadow: var(--shadow);
}

.nav-item .icon {
    width: 20px;
    text-align: center;
}

/* Top Bar Fixed - Refined UI */
.top-bar-fixed {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 70px;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.top-bar-fixed .page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1c1c1e;
    line-height: 1;
}

.header-utilities {
    display: flex;
    align-items: center;
    gap: 24px;
}

.theme-toggle,
.notif-wrapper {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c1c1e;
    font-size: 24px;
}

.notif-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background: #FF3B30;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: white;
    display: none;
}

.notif-wrapper.has-unread .notif-dot {
    display: flex;
}

.header-profile-group {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.header-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #FF4D00;
    padding: 2px;
    border: 1.5px solid #FF4D00;
}

.header-chevron {
    font-size: 16px;
    color: #8E8E93;
}

/* Profile Dropdown Refined */
.header-profile-container {
    position: relative;
    display: inline-block;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 250px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1002;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 15px 15px 5px 15px;
}

.admin-name {
    font-size: 20px;
    font-weight: 700;
    color: #1c1c1e;
    line-height: 1.2;
}

.dropdown-body {
    padding: 10px 0;
}

.dropdown-item {
    display: block;
    padding: 12px 15px;
    font-size: 18px;
    font-weight: 600;
    color: #1c1c1e;
    border-radius: 8px;
    transition: 0.2s;
    line-height: 1.2;
}

.dropdown-item:hover {
    background: #f5f5f7;
    color: var(--primary);
}

.login-time-info {
    padding: 12px 15px;
    font-size: 16px;
    color: #8E8E93;
    font-weight: 500;
    line-height: 1.2;
}

.logout-link {
    color: #8E8E93;
    margin-top: 5px;
}

.logout-link:hover {
    background: #FFF0F0;
    color: var(--primary);
}

/* Dark Mode Support for Dropdown */
body.dark-mode .profile-dropdown {
    background: #1a1a1b;
    border-color: #2c2c2e;
}

body.dark-mode .admin-name,
body.dark-mode .dropdown-item {
    color: white;
}

body.dark-mode .dropdown-item:hover {
    background: #2c2c2e;
}

body.dark-mode .login-time-info {
    color: #8e8e93;
}

/* Global Dark Mode Styles */
body.dark-mode {
    background: #111111 !important;
    color: #ffffff !important;
}

body.dark-mode .sidebar {
    background: #1a1a1b !important;
    border-right: 1px solid #2c2c2e;
}

body.dark-mode .sidebar-logo span {
    color: white;
}

body.dark-mode .top-bar-fixed {
    background: #1a1a1b !important;
    border-bottom: 1px solid #2c2c2e;
    box-shadow: none;
}

body.dark-mode .top-bar-fixed .page-title,
body.dark-mode .theme-toggle,
body.dark-mode .notif-wrapper,
body.dark-mode .info-item .value,
body.dark-mode .table-custom th,
body.dark-mode .app-name-link {
    color: white;
}

body.dark-mode .notif-dot {
    border-color: #1a1a1b;
}

body.dark-mode .card,
body.dark-mode .stat-card-white,
body.dark-mode .ai-center-panel,
body.dark-mode .ai-right-panel,
body.dark-mode .chat-history {
    background: rgba(7, 24, 41, 0.95) !important;
    border-color: #2c2c2e !important;
    color: white !important;
    box-shadow: rgb(125 125 125 / 0%) 0px 18px 28px 0, rgb(125 125 125 / 21%) 0 2px 4px 0, rgb(125 125 125 / 59%) 0 0 0 1px inset;

}

body.dark-mode .nav-item:hover,
body.dark-mode .nav-item.active {
    background: #2c2c2e;
    color: var(--primary);
}

body.dark-mode .form-control,
body.dark-mode .filter-select {
    background: #2c2c2e;
    border-color: #3a3a3c;
    color: white;
}

/* Integration Item */
.integration-item {
    background: #fafafa;
}

.integration-name {
    color: #1c1c1e;
}

.integration-desc {
    color: #666;
}

body.dark-mode .integration-item {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: #2c2c2e !important;
}

body.dark-mode .integration-name {
    color: white !important;
}

body.dark-mode .integration-desc {
    color: #8e8e93 !important;
}

/* Legacy Top Bar (if needed for fallback) */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 15px;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    overflow: hidden;
}

/* Components */
.btn {
    padding: 17px 45px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
    background: #eee;
    align-content: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
    margin-top: 20px;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

/* Notification System Refined UI */
.notif-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 380px;
    /* Increased weight/width */
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid #f0f0f0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1002;
    overflow: hidden;
}

.notif-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notif-header {
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
}

.notif-body {
    max-height: 400px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f9f9f9;
    transition: 0.2s;
    text-decoration: none;
    color: inherit;
}

.notif-item:hover {
    background: #fcfcfc;
}

.notif-item.unread {
    background: #fffcfb;
}

.notif-icon-box {
    width: 42px;
    height: 42px;
    background: #FF3B30;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
}

.notif-title {
    font-size: 15px;
    font-weight: 700;
    color: #1c1c1e;
    margin-bottom: 3px;
    line-height: 1.2;
}

.notif-desc {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    margin-bottom: 5px;
}

.notif-time {
    font-size: 11px;
    color: #8E8E93;
    font-weight: 500;
}

.notif-empty {
    padding: 30px 20px;
    text-align: center;
    color: #8E8E93;
    font-size: 14px;
}

/* Dark Mode Adaptation for Notifications */
body.dark-mode .notif-dropdown {
    background: #1a1a1b;
    border-color: #2c2c2e;
}

body.dark-mode .notif-header {
    background: #242426;
    border-color: #2c2c2e;
}

body.dark-mode .notif-item {
    border-color: #2c2c2e;
}

body.dark-mode .notif-item:hover {
    background: #2c2c2e;
}

body.dark-mode .notif-item.unread {
    background: #1e1310;
}

body.dark-mode .notif-title {
    color: white;
}

body.dark-mode .notif-desc {
    color: #ccc;
}

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

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

.card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    border: 1px solid #f0f0f0;

}

/* Dashboard Specifics */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* Red Card */
.stat-card-red {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    padding: 30px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.stat-card-red h2 {
    font-size: 42px;
    font-weight: 700;
    margin: 10px 0;
}

.stat-card-red p {
    opacity: 0.9;
}

.stat-card-red .circle-decor {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    bottom: -80px;
    right: -50px;
}

/* White Stat Card */
.stat-card-white {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}

.stat-icon-circle {
    width: 50px;
    height: 50px;
    background: var(--primary-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
}

.stat-val {
    font-size: 24px;
    font-weight: 700;
}

.arrow-up {
    transform: rotate(-45deg);
    font-size: 20px;
    color: var(--primary-bg);
    /* Placeholder */
}

/* Table */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    /* Increased for better row separation */
}

.table-custom th {
    text-align: left;
    padding: 15px;
    color: var(--text-gray);
    font-weight: 500;
    font-size: 13px;
}

.table-custom td {
    padding: 18px 15px;
    font-size: 14px;
    background: white;
    /* Base white for light mode */
}

.table-custom tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.table-custom tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Dark Mode Full Row Styling */
body.dark-mode .table-custom td {
    background: transparent !important;
    /* Make cells transparent to show row style */
}

body.dark-mode .table-custom tr {
    background-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: rgba(125, 125, 125, 0.2) 0 12px 28px 0,
        rgba(125, 125, 125, 0.2) 0 2px 4px 0,
        rgba(125, 125, 125, 0.2) 0 0 0 1px inset;
    border-radius: 10px;

}

body.dark-mode .table-custom tr th {
    background: transparent !important;
    box-shadow: none !important;
}

.avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 10px;
    background: #eee;
}

/* Calendar Widget (Simple CSS) */
.calendar-widget {
    text-align: center;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 20px;
    font-size: 13px;
}

.cal-day {
    width: 30px;
    height: 30px;
    line-height: 30px;
    border-radius: 50%;
    margin: 0 auto;
}

.cal-day.active {
    background: var(--primary);
    color: white;
    font-weight: bold;
}

.cal-head {
    color: var(--text-gray);
    font-weight: 600;
}

/* Form Elements */
.form-control {
    width: 100%;
    padding: 13px 30px;
    border-radius: 12px;
    border: 1px solid #eee;
    background: #fafafa;
    font-family: inherit;
}

.card-filer {
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
}

/* Login Page overrides */
.login-container {
    background: #f0f2f5;
}

/* Careers Page Styles */
.careers-layout {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 60px;
}

.page-main-title {
    font-size: 56px;
    line-height: 1.1;
    color: #00334E;
    font-weight: 700;
    margin-bottom: 60px;
}

.contact-box {
    margin-top: 40px;
}

.contact-label {
    font-size: 12px;
    font-weight: 700;
    color: #7D8995;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.contact-email {
    font-size: 18px;
    color: #F37021;
    text-decoration: underline;
    font-weight: 500;
}

.job-row {
    padding: 40px 0;
    border-bottom: 1px solid #E5E5EA;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-row:first-child {
    border-top: 1px solid #E5E5EA;
}

.job-label {
    font-size: 11px;
    font-weight: 700;
    color: #1A9CB7;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.job-title {
    font-size: 32px;
    color: #00334E;
    font-weight: 600;
    margin-bottom: 12px;
}

.job-meta-line {
    font-size: 15px;
    color: #7D8995;
    font-weight: 400;
}

.dot {
    margin: 0 8px;
    color: #ccc;
}

.btn-submit {
    background-color: #F37021;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-submit:hover {
    background-color: #D9641C;
    transform: translateY(-1px);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease-in-out;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 400px;
    text-align: center;
    transform: scale(0.9);
    transition: all 0.2s ease-in-out;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

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

.modal-icon {
    width: 60px;
    height: 60px;
    background: #FEE2E2;
    color: #EF4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1C1C1E;
}

.modal-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-modal-cancel {
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: white;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-modal-cancel:hover {
    background: #F3F4F6;
}

.btn-modal-delete {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: #EF4444;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.btn-modal-delete:hover {
    background: #DC2626;
}

/* Status Labels */
.status-select {
    font-size: 12px;
    font-weight: 600;
    border: none;
    border-radius: 20px;
    padding: 4px 10px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
    width: 100px;
}

.status-scheduled {
    background: #E3F2FD;
    color: #1565C0;
}

.status-completed {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-cancelled {
    background: #FFEBEE;
    color: #C62828;
}

/* Application Selection Statuses */
.status-new {
    background: #F3F4F6;
    color: #374151;
}

.status-shortlisted {
    background: #EEF2FF;
    color: #4338CA;
}

.status-selected {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-rejected {
    background: #FFEBEE;
    color: #C62828;
}

/* Interviews Page Utilities */
.btn-update {
    background: #4ADE80;
    color: #065F46;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.btn-delete {
    background: #FFEBEE;
    color: #C62828;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    border: none;
    cursor: pointer;
}

/* Interview Scheduling Calendar */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.month-label {
    font-size: 16px;
    font-weight: 700;
    color: #1c1c1e;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.day-name {
    font-size: 12px;
    font-weight: 600;
    color: #8e8e93;
    padding-bottom: 10px;
    text-transform: uppercase;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1e;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.calendar-day:hover:not(.empty) {
    background: #f1f3f5;
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(255, 59, 48, 0.3);
    font-weight: 700;
}

.calendar-day.today {
    border: 1px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
}

.calendar-day.empty {
    cursor: default;
}

.time-picker-group {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #f1f3f5;
}

.time-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.custom-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
    background: #f9fafb;
    font-family: inherit;
    font-size: 14px;
}

.btn-schedule {
    width: 100%;
    background: #1c1c1e;
    color: white;
    padding: 16px;
    border-radius: 15px;
    font-weight: 700;
    border: none;
    margin-top: 20px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-schedule:hover {
    background: #000;
    transform: translateY(-2px);
}

.filter-select {
    padding: 13px 30px;
    border-radius: 12px;
    border: 1px solid #eee;
}