/* =====================================================
   ARS Connection HRMS - Auth & Login Styles
   ===================================================== */

/* Login Page */
.login-page {
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.login-page.visible {
    opacity: 1;
}

.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Left Panel - Branding */
.login-left {
    flex: 1;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a10 50%, #0f0a15 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-brand-area {
    text-align: center;
    z-index: 2;
    padding: 40px;
}

.login-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #E11D48;
    border-radius: 50%;
    left: var(--x);
    top: var(--y);
    opacity: 0;
    animation: particleFloat 6s var(--delay) infinite;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0); }
    25% { opacity: 0.6; transform: translateY(-30px) scale(1); }
    75% { opacity: 0.3; transform: translateY(-80px) scale(0.8); }
}

.login-logo {
    margin-bottom: 24px;
    display: inline-block;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(225, 29, 72, 0.3)); }
    50% { filter: drop-shadow(0 0 40px rgba(225, 29, 72, 0.6)); }
}

.login-brand-name {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-brand-desc {
    color: #9CA3AF;
    font-size: 16px;
    margin-bottom: 40px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
    max-width: 280px;
    margin: 0 auto;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #D1D5DB;
    font-size: 14px;
}

.login-feature svg {
    color: #E11D48;
    flex-shrink: 0;
}

.login-powered {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #6B7280;
    font-size: 12px;
    white-space: nowrap;
}
.login-powered strong {
    color: #9CA3AF;
}

/* Right Panel - Form */
.login-right {
    flex: 1;
    background: #0f0f0f;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-container {
    width: 100%;
    max-width: 420px;
}

.login-form-header {
    margin-bottom: 32px;
}

.login-form-header h2 {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.login-form-header p {
    color: #9CA3AF;
    font-size: 15px;
}

/* Form Fields */
.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #D1D5DB;
    margin-bottom: 6px;
}

.login-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 0 14px;
    transition: all 0.2s ease;
}

.login-input-wrap:focus-within {
    border-color: #E11D48;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
}

.login-input-wrap svg {
    color: #6B7280;
    flex-shrink: 0;
}

.login-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    padding: 14px 0;
    font-family: 'Inter', system-ui, sans-serif;
}

.login-input-wrap input::placeholder {
    color: #4B5563;
}

.password-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #6B7280;
    display: flex;
    align-items: center;
}
.password-toggle:hover {
    color: #9CA3AF;
}

/* Error */
.login-error {
    background: rgba(225, 29, 72, 0.1);
    border: 1px solid rgba(225, 29, 72, 0.3);
    color: #F87171;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-error.shake {
    animation: shakeError 0.5s ease;
}

@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}

/* Submit Button */
.login-submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.login-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.login-submit-btn:hover::after {
    transform: translateX(100%);
}

.login-btn-loader {
    display: inline-flex;
    align-items: center;
}

/* Demo Accounts */
.login-demo-accounts {
    border-top: 1px solid #1f1f1f;
    padding-top: 20px;
}

.login-demo-title {
    font-size: 12px;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    text-align: center;
}

.demo-account-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.demo-account-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a1a;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 10px 14px;
    color: #D1D5DB;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', system-ui, sans-serif;
    width: 100%;
    text-align: left;
}

.demo-account-btn:hover {
    border-color: #E11D48;
    background: rgba(225, 29, 72, 0.05);
}

.demo-role-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-role-badge.role-admin {
    background: rgba(225, 29, 72, 0.2);
    color: #E11D48;
}
.demo-role-badge.role-ceo {
    background: rgba(124, 58, 237, 0.2);
    color: #A78BFA;
}
.demo-role-badge.role-director {
    background: rgba(37, 99, 235, 0.2);
    color: #60A5FA;
}

.demo-email {
    color: #9CA3AF;
    font-family: monospace;
    font-size: 12px;
}

/* Header Role Badge */
.header-role-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.header-role-badge.role-admin { background: rgba(225, 29, 72, 0.15); color: #E11D48; }
.header-role-badge.role-ceo { background: rgba(124, 58, 237, 0.15); color: #A78BFA; }
.header-role-badge.role-director { background: rgba(37, 99, 235, 0.15); color: #60A5FA; }
.header-role-badge.role-manager { background: rgba(5, 150, 105, 0.15); color: #34D399; }
.header-role-badge.role-team_leader { background: rgba(217, 119, 6, 0.15); color: #FBBF24; }
.header-role-badge.role-employee { background: rgba(107, 114, 128, 0.15); color: #9CA3AF; }

/* Role indicator dot in sidebar */
.role-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}
.role-indicator.role-admin { background: #E11D48; }
.role-indicator.role-ceo { background: #7C3AED; }
.role-indicator.role-director { background: #2563EB; }
.role-indicator.role-manager { background: #059669; }
.role-indicator.role-team_leader { background: #D97706; }
.role-indicator.role-employee { background: #6B7280; }

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    width: 280px;
    z-index: 1000;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    overflow: hidden;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #2a2a2a;
}

.dropdown-name {
    display: block;
    font-weight: 600;
    color: #fff;
    font-size: 14px;
}

.dropdown-email {
    display: block;
    color: #6B7280;
    font-size: 12px;
    margin-top: 2px;
}

.dropdown-role {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dropdown-role.role-admin { background: rgba(225, 29, 72, 0.2); color: #E11D48; }
.dropdown-role.role-ceo { background: rgba(124, 58, 237, 0.2); color: #A78BFA; }
.dropdown-role.role-director { background: rgba(37, 99, 235, 0.2); color: #60A5FA; }
.dropdown-role.role-manager { background: rgba(5, 150, 105, 0.2); color: #34D399; }
.dropdown-role.role-team_leader { background: rgba(217, 119, 6, 0.2); color: #FBBF24; }
.dropdown-role.role-employee { background: rgba(107, 114, 128, 0.2); color: #9CA3AF; }

.dropdown-divider {
    height: 1px;
    background: #2a2a2a;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: #D1D5DB;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Inter', system-ui, sans-serif;
    transition: background 0.15s;
    text-align: left;
}

.dropdown-item:hover {
    background: #222;
}

.dropdown-item.danger {
    color: #F87171;
}
.dropdown-item.danger:hover {
    background: rgba(225, 29, 72, 0.1);
}

/* Brand powered in sidebar */
.brand-powered {
    text-align: center;
    font-size: 10px;
    color: #4B5563;
    padding: 8px 0 4px;
}
.brand-powered strong {
    color: #6B7280;
}

/* Notif empty state */
.notif-empty {
    padding: 24px;
    text-align: center;
    color: #6B7280;
    font-size: 13px;
}

/* Loading spinner */
.spinner {
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Hierarchy Info */
.hierarchy-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #9CA3AF;
    padding: 2px 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    margin-top: 4px;
}

/* Shift Management Styles */
.shifts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.shift-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.shift-card:hover {
    border-color: #3a3a3a;
}

.shift-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shift-time {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.shift-time-separator {
    color: #E11D48;
    margin: 0 6px;
}

.shift-card-employee {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.shift-dates {
    font-size: 12px;
    color: #6B7280;
}

.shift-status-active {
    font-size: 11px;
    font-weight: 500;
    color: #10B981;
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

/* HR Role Badge */
.header-role-badge.role-hr { background: rgba(236, 72, 153, 0.15); color: #F472B6; }
.dropdown-role.role-hr { background: rgba(236, 72, 153, 0.2); color: #F472B6; }
.role-indicator.role-hr { background: #EC4899; }
.emp-role-badge.role-hr { background: rgba(236, 72, 153, 0.15); color: #F472B6; }

/* Login Security Note (replaces demo accounts) */
.login-security-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(107, 114, 128, 0.08);
    border: 1px solid rgba(107, 114, 128, 0.15);
    border-radius: 8px;
    margin-top: 16px;
}
.login-security-note svg { color: #6B7280; flex-shrink: 0; }
.login-security-note span { font-size: 12px; color: #6B7280; line-height: 1.4; }

/* Credentials Display Modal */
.credentials-display { text-align: center; }
.credentials-success { margin-bottom: 24px; }
.credentials-success svg { margin: 0 auto 12px; display: block; }
.credentials-success h3 { font-size: 18px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.credentials-success p { font-size: 13px; color: #9CA3AF; }

.credentials-card {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}
.credential-row { margin-bottom: 12px; }
.credential-row:last-child { margin-bottom: 0; }
.credential-row label { display: block; font-size: 11px; color: #6B7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.credential-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(225, 29, 72, 0.05);
    border: 1px solid rgba(225, 29, 72, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
}
.credential-value code {
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
    user-select: all;
}

.credentials-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
}
.credentials-warning svg { color: #F59E0B; flex-shrink: 0; }
.credentials-warning span { font-size: 12px; color: #FBBF24; line-height: 1.4; }

/* Credential Notice in Add Employee Form */
.credential-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    margin-bottom: 20px;
}
.credential-notice svg { color: #3B82F6; flex-shrink: 0; margin-top: 2px; }
.credential-notice strong { display: block; font-size: 13px; color: #93C5FD; margin-bottom: 2px; }
.credential-notice span { font-size: 12px; color: #9CA3AF; }

/* Salary Preview Box (HR form) */
.salary-preview-box {
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
    margin-bottom: 8px;
}
.salary-preview-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    color: #9CA3AF;
}
.salary-preview-row.net {
    border-top: 1px solid #2a2a2a;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    .login-left {
        display: none;
    }
    .login-right {
        flex: 1;
        padding: 24px;
    }
    .login-form-container {
        max-width: 100%;
    }
}

/* Forgot Password Panel */
.forgot-pw-panel {
    margin-top: 16px;
    padding: 16px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}
.forgot-pw-panel.visible {
    opacity: 1;
    transform: translateY(0);
}
.forgot-pw-inner h4 {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}
.forgot-pw-inner p {
    font-size: 12px;
    color: #9CA3AF;
    margin-bottom: 12px;
}
.login-forgot-row {
    margin-top: 8px;
    margin-bottom: 12px;
    text-align: right;
}
.login-forgot-link {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.login-forgot-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
