/* styles.css - Custom Styling for QXI HR (OPC) Private Limited */
/* Light Warm Royal Elegant Edition */

:root {
    --bg-dark: #f9f8f5; /* Warm Royal Ivory/Cream */
    --bg-card: rgba(255, 255, 255, 0.9); /* Milky-glass white */
    --bg-glass-hover: rgba(217, 119, 6, 0.04); /* Soft warm gold hover */
    --border-glass: rgba(180, 83, 9, 0.12); /* Delicate warm amber/gold border */
    --border-glow: rgba(67, 56, 202, 0.2);
    --color-primary: #4338ca; /* Noble Royal Indigo */
    --color-primary-glow: rgba(67, 56, 202, 0.15);
    --color-secondary: #b45309; /* Imperial Golden Amber */
    --color-success: #15803d; /* Forest Emerald Green */
    --color-danger: #b91c1c; /* Crimson Red */
    --color-warning: #c2410c; /* Burnt Amber Orange */
    --text-primary: #1e1b4b; /* Deep Majestic Indigo Text */
    --text-muted: #5c5a70; /* Warm Slate Muted Text */
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f0ea;
}
::-webkit-scrollbar-thumb {
    background: #dcdbd3;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c2c1b8;
}

/* Auth Section */
.auth-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at 10% 20%, rgba(67, 56, 202, 0.08) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(180, 83, 9, 0.08) 0%, transparent 45%),
                #f9f8f5;
    padding: 20px;
}

.auth-card {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    box-shadow: 0 20px 50px rgba(67, 56, 202, 0.06), 
                0 0 40px rgba(180, 83, 9, 0.03);
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    padding: 40px;
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #1e1b4b 30%, #4338ca);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.auth-logo span {
    font-size: 13px;
    display: block;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-top: 5px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 8px;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d1cfc7;
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: all var(--transition-speed);
}

.form-input:focus {
    border-color: var(--color-primary);
    background: #ffffff;
    box-shadow: 0 0 15px rgba(67, 56, 202, 0.1);
}

.form-select {
    width: 100%;
    background: #ffffff;
    border: 1px solid #d1cfc7;
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.form-select:focus {
    border-color: var(--color-primary);
}

.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--color-primary), #3730a3);
    color: white;
    border: none;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(67, 56, 202, 0.2);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(67, 56, 202, 0.3);
}

.easy-login-panel {
    margin-top: 30px;
    border-top: 1px dashed #e5e3d9;
    padding-top: 20px;
}

.easy-login-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-align: center;
}

.easy-login-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.btn-easy-login {
    background: #f5f4ed;
    border: 1px solid #e5e3d9;
    color: var(--text-primary);
    font-size: 11px;
    padding: 8px 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-easy-login:hover {
    background: #eef1f6;
    color: var(--color-primary);
    border-color: var(--color-primary-glow);
}

/* App Layout */
.app-layout {
    display: flex;
    width: 100%;
}

/* Sidebar Styling - Royal Prestige Edition (Regal Deep Blue-Indigo Sidebar) */
.sidebar {
    width: var(--sidebar-width);
    background: #111029; /* Prestigious Warm Indigo Navy */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-logo {
    font-size: 22px;
    font-weight: 850;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.sidebar-logo span {
    font-size: 10px;
    display: block;
    color: var(--color-secondary); /* Noble Gold */
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 3px;
    font-weight: 700;
}

.sidebar-profile {
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #1e1b4b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-info {
    flex-grow: 1;
    overflow: hidden;
}

.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 11px;
    color: var(--color-secondary);
    font-weight: 600;
    margin-top: 2px;
}

.profile-id {
    font-size: 10px;
    color: #a5a2bc;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 20px 16px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    color: #8c89a8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 15px 0 8px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: #cbd5e1;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item-content i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #8c89a8;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.nav-item:hover i {
    color: #fff;
}

.nav-item.active {
    color: #fff;
    background: var(--color-primary);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

.nav-item.active i {
    color: #fff;
}

.nav-item.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

.lock-badge {
    font-size: 12px;
    color: var(--color-danger);
}

.sidebar-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
    background: radial-gradient(circle at 80% 10%, rgba(180, 83, 9, 0.04) 0%, transparent 50%), #f9f8f5;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.view-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    border-bottom: 1px solid #e5e3d9;
    padding-bottom: 20px;
}

.section-title-box h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.section-title-box p {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(180, 83, 9, 0.02);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--color-secondary);
    box-shadow: 0 10px 20px rgba(180, 83, 9, 0.06);
}

.stat-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 6px;
    background: linear-gradient(135deg, #1e1b4b 60%, var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(67, 56, 202, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 20px;
}

.stat-card:nth-child(2n) .stat-icon-wrapper {
    background: rgba(180, 83, 9, 0.06);
    color: var(--color-secondary);
}

/* Glass Card */
.glass-card {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(180, 83, 9, 0.02);
    margin-bottom: 30px;
}

.card-title-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--color-secondary);
}

/* Clock In Widget */
.clock-widget-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.clock-timer {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    font-family: monospace;
    background: #f5f4ed;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #e5e3d9;
}

.clock-actions {
    display: flex;
    gap: 15px;
}

.btn-clock-in {
    background: var(--color-success);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-clock-in:hover {
    box-shadow: 0 0 15px rgba(21, 128, 61, 0.3);
}

.btn-clock-out {
    background: var(--color-danger);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-clock-out:hover {
    box-shadow: 0 0 15px rgba(185, 28, 28, 0.3);
}

/* Interactive Tables */
.table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.custom-table th {
    background: #fcfbfa;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 20px;
    border-bottom: 2px solid #e5e3d9;
}

.custom-table td {
    padding: 16px 20px;
    font-size: 13.5px;
    border-bottom: 1px solid #f1f0eb;
    color: var(--text-primary);
}

.custom-table tbody tr {
    transition: background 0.2s;
}

.custom-table tbody tr:hover {
    background: #faf9f6;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-present, .badge-active, .badge-open, .badge-approved {
    background: rgba(21, 128, 61, 0.08);
    color: var(--color-success);
    border: 1px solid rgba(21, 128, 61, 0.2);
}

.badge-absent, .badge-closed, .badge-rejected {
    background: rgba(185, 28, 28, 0.08);
    color: var(--color-danger);
    border: 1px solid rgba(185, 28, 28, 0.2);
}

.badge-pending, .badge-inquired {
    background: rgba(180, 83, 9, 0.08);
    color: var(--color-secondary);
    border: 1px solid rgba(180, 83, 9, 0.2);
}

.badge-shortlisted {
    background: rgba(67, 56, 202, 0.08);
    color: var(--color-primary);
    border: 1px solid rgba(67, 56, 202, 0.2);
}

/* Onboarding Wizard */
.wizard-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.wizard-stepper::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e5e3d9;
    z-index: 1;
}

.step-indicator {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #e5e3d9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    z-index: 2;
    transition: all 0.3s;
    cursor: pointer;
}

.step-wrapper {
    text-align: center;
    flex: 1;
}

.step-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 8px;
}

.step-wrapper.active .step-indicator {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
    box-shadow: 0 0 15px rgba(67, 56, 202, 0.2);
}

.step-wrapper.active .step-label {
    color: var(--text-primary);
}

.step-wrapper.completed .step-indicator {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.wizard-content {
    max-width: 700px;
    margin: 0 auto;
}

.wizard-pane {
    display: none;
}

.wizard-pane.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* Onboarding Checklist Tracker */
.checklist-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #faf9f6;
    border: 1px solid var(--border-glass);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 12px;
}

/* Custom Interactive Switches - Royal Gold toggles */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1cfc7;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-secondary); /* Gold/Amber checked background */
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Filters and Forms Row */
.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

/* Buttons and UI Interactive Components */
.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(67, 56, 202, 0.1);
}

.btn-primary:hover {
    background: #3730a3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f5f4ed;
    color: var(--text-primary);
    border: 1px solid #d1cfc7;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #eef1f6;
    border-color: var(--color-primary-glow);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.action-btn-group {
    display: flex;
    gap: 8px;
}

/* Tab Headers Profile */
.tab-headers {
    display: flex;
    border-bottom: 1px solid #e5e3d9;
    margin-bottom: 30px;
    gap: 5px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
}

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

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-primary);
}

.tab-pane {
    display: none;
}

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

/* live skills component */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.skill-tag {
    background: rgba(67, 56, 202, 0.05);
    color: var(--color-primary);
    border: 1px solid rgba(67, 56, 202, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.skill-tag .remove-btn {
    color: var(--color-danger);
    cursor: pointer;
    font-size: 14px;
    display: inline-block;
    transition: scale 0.15s;
}

.skill-tag .remove-btn:hover {
    scale: 1.2;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 27, 75, 0.4); /* Elegant dark-blue mist overlay */
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(30, 27, 75, 0.08);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-title {
    font-size: 20px;
    font-weight: 850;
    color: var(--text-primary);
}

.btn-close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

/* PDF Preview Frame */
.pdf-iframe-container {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    border: 1px solid #e5e3d9;
    background: #ffffff;
    overflow: hidden;
}

.pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Access Control Matrix */
.permissions-matrix-table td {
    padding: 12px 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Toast Messages */
.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
}

.toast {
    background: #ffffff;
    border-left: 4px solid var(--color-primary);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(30, 27, 75, 0.1);
    margin-bottom: 10px;
    animation: slideIn 0.3s ease forwards;
}

.toast.success {
    border-color: var(--color-success);
}

.toast.error {
    border-color: var(--color-danger);
}

/* Responsive grid layouts */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 1024px) {
    .two-col-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    .sidebar-header, .sidebar-profile .profile-info, .sidebar-profile .profile-id, .nav-item span {
        display: none;
    }
    .profile-avatar {
        width: 36px;
        height: 36px;
    }
    .sidebar-profile {
        padding: 15px;
        justify-content: center;
    }
    .nav-item {
        justify-content: center;
        padding: 12px;
    }
    .main-content {
        margin-left: 70px;
        padding: 20px;
    }
}
