/* Custom Styles */
body { font-family: 'Outfit', sans-serif; margin: 0; background: #f0f2f5; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.glass-panel {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.chart-container { position: relative; width: 100%; height: 250px; margin: 0 auto; }

.fade-in { animation: fadeIn 0.4s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

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

input:focus, select:focus, textarea:focus { 
    background-color: #f0fdf4; 
    border-radius: 4px; 
    outline: 2px solid #4f46e5; 
    outline-offset: -1px;
}

/* Login Redesign - Unified Card Layout */
#login-view {
    background-color: #f1f5f9; /* Light gray background */
    background-image: url('../assets/images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden; /* Prevent scrolling */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh; /* Fixed height */
    padding: 1rem;
}

/* The "Big Tab" Card */
.login-card-container {
    width: 100%;
    max-width: 1100px;
    height: auto;
    max-height: 95vh; /* constrain height */
    min-height: 0; /* remove strict min-height */
    background-color: #ffffff;
    border-radius: 32px; /* Large rounded corners */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15); /* Deep shadow */
    display: flex;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* Custom Split Screen Styles */
.login-left-panel {
    display: none; /* Mobile default */
    width: 50%;
    background-color: #f8fafc; 
    position: relative;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    overflow: hidden;
    border-right: 1px solid #e2e8f0;
}

.login-right-panel {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    background-color: #ffffff;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .login-left-panel {
        display: flex !important;
    }
    .login-right-panel {
        width: 50%;
        padding: 3rem;
    }
    .login-right-panel {
        width: 50%;
        padding: 3rem;
    }
}

/* Responsive adjustments for smaller height screens */
@media (max-height: 800px) {
    .login-card-container {
        border-radius: 20px;
        min-height: 0;
    }
    .login-left-panel {
        padding: 1.5rem;
    }
    .login-right-panel {
        padding: 1.5rem 2rem;
    }
    .login-input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    }
    .input-icon {
        left: 0.8rem;
    }
}
/* .login-bg::after {
    background: radial-gradient(#ec4899, transparent 70%); 
    bottom: -10%;
    right: -10%;
    animation-delay: -10s;
} */

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

/* Glass Card Enhanced (Light) */
.glass-card {
    /* background: rgba(255, 255, 255, 0.8); overridden */
    box-shadow: 0 20px 40px -6px rgba(0, 0, 0, 0.05), 0 0 10px rgba(0,0,0,0.02);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    /* border: 1px solid rgba(255, 255, 255, 0.8); overridden */
    position: relative;
    z-index: 10;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    /* background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.1)); overridden */
    pointer-events: none;
    z-index: -1;
}

/* Floating Label Inputs (Light) */
.input-group {
    position: relative;
}

.login-input {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1rem 1rem 3rem; /* Left padding for icon */
    color: #1e293b;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-input:focus {
    background: #ffffff;
    border-color: #6366f1; /* Indigo 500 */
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    transition: color 0.3s ease;
    pointer-events: none;
}

.input-group:focus-within .input-icon {
    color: #6366f1;
}

/* Floating Label (Light) */
.floating-label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.3s ease;
}
.login-input:focus ~ .floating-label,
.login-input:not(:placeholder-shown) ~ .floating-label {
    top: -0.8rem; /* revised for inside input feel or move to standard top label */
    left: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    background: #f8fafc; /* Match container bg or white if on card? Card is semi-transparent, so maybe white */
    background: rgba(255,255,255,0.9);
    padding: 0 0.5rem;
    border-radius: 4px;
}

/* Role Selector Styled (Light) */
.role-btn {
    position: relative;
    z-index: 10;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    transition: color 0.3s ease;
}
.role-btn.active {
    color: white; /* Active text is white because highlight is dark/colored */
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Button Glow (Light) */
.btn-glow {
    position: relative;
    overflow: hidden;
}
.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.3s;
}
.btn-glow:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Print Styles */
@media print {
    body * { visibility: hidden !important; }
    
    #salary-modal:not(.hidden), #salary-modal:not(.hidden) *,
    #salary-side-panel:not(.hidden), #salary-side-panel:not(.hidden) * { 
        visibility: visible !important; 
    }
    
    #salary-modal:not(.hidden),
    #salary-side-panel:not(.hidden) { 
        display: block !important;
        position: absolute !important; 
        left: 0 !important; 
        top: 0 !important; 
        width: 100% !important; 
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        background: white !important; 
        z-index: 9999 !important;
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    #salary-modal-content,
    #salary-side-content {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .no-print { display: none !important; } 
}

/* Table Enhancements */
.sticky-col-left { position: sticky; left: 0; z-index: 20; background-color: #fff; box-shadow: 2px 0 5px -2px rgba(0,0,0,0.1); }
thead .sticky-col-left { background-color: #f8fafc; z-index: 30; }
.att-cell:hover { background-color: #f1f5f9; }

.ledger-scroll-container {
    overflow-y: auto; overflow-x: auto; max-height: 65vh; border-top: 1px solid #e2e8f0; display: block; width: 100%;
}
.ledger-table {
    width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed;
}
.ledger-table thead th {
    position: sticky; top: 0; z-index: 20; background-color: #f1f5f9; border-bottom: 2px solid #e2e8f0;
}
.ledger-table input { width: 100%; font-weight: 500; }

.bg-white.rounded-2xl, .bg-white.rounded-\[32px\] { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.bg-white.rounded-2xl:hover, .bg-white.rounded-\[32px\]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

/* Neumorphic Toggle */
.neu-toggle-wrapper {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 32px;
}

.neu-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.neu-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e2e8f0;
    transition: .4s;
    border-radius: 34px;
    box-shadow: inset 3px 3px 6px #cbd5e1, inset -3px -3px 6px #ffffff;
}

.neu-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: #f1f5f9;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 2px 2px 5px #cbd5e1, -2px -2px 5px #ffffff;
}

.neu-toggle-input:checked + .neu-slider {
    background-color: #e2e8f0;
}

.neu-toggle-input:checked + .neu-slider:before {
    transform: translateX(28px);
    background-color: #4f46e5;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2), 2px 2px 5px #cbd5e1;
}

/* --- SMART ID CARD STYLES --- */

#id-card-container {
    --color-bg: #f8fafc;
    --color-card-bg: #ffffff;
    --color-text-main: #1e293b;
    --color-text-muted: #64748b;
    --color-accent: #4f46e5; 
    --color-gradient-start: #4f46e5;
    --color-gradient-end: #7c3aed;
    
    /* Card Interaction Variables (Updated by JS) */
    --pointer-x: 50%;
    --pointer-y: 50%;
    --card-opacity: 0;
    --rotate-x: 0deg;
    --rotate-y: 0deg;
    --card-scale: 1;

    perspective: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

/* * CARD WRAPPER */
.card-wrapper {
    position: relative;
    z-index: 1;
    cursor: pointer;
}

/* * THE CARD (Tilt Container) */
#card {
    width: 320px;
    aspect-ratio: 0.63;
    border-radius: 20px;
    position: relative;
    transform: 
        perspective(1000px)
        scale(var(--card-scale))
        rotateX(var(--rotate-y))
        rotateY(var(--rotate-x));
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.2, 0, 0.4, 1);
    will-change: transform;
    box-shadow: 
        0 20px 40px -10px rgba(79, 70, 229, 0.15),
        0 0 0 1px rgba(0,0,0,0.05);
}

/* Active/Hover State for Tilt */
.card-wrapper:hover #card,
.card-wrapper.active #card {
    transition: none;
    --card-scale: 1.02;
    --card-opacity: 1;
}

/* * CARD INNER (Flip Container) */
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
}

.card-inner.is-flipped {
    transform: rotateY(180deg);
}

/* * CARD FACES */
.card__face {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    background: white;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card__face--front {
    z-index: 2;
    transform: rotateY(0deg);
}

.card__face--back {
    transform: rotateY(180deg);
    background-color: #f1f5f9;
}

/* --- FRONT FACE STYLING --- */

.id-header {
    height: 110px;
    background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 1.5rem;
    clip-path: ellipse(150% 100% at 50% 0%);
}

.company-logo {
    color: white;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.avatar-container {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: white;
    padding: 4px;
    margin: -55px auto 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #e2e8f0;
    border: 2px solid #f1f5f9;
}

.id-body {
    padding: 1rem 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.card-user-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-text-main);
    letter-spacing: -0.5px;
    margin-top: 0.5rem;
}

.card-user-role {
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    background: #e0e7ff;
    padding: 4px 12px;
    border-radius: 20px;
    align-self: center;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 0.5rem;
    border-top: 1px dashed #cbd5e1;
    padding-top: 1.2rem;
    text-align: left;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
}

.info-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.id-footer {
    padding: 0.8rem;
    background: white;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* --- BACK FACE STYLING --- */

.magnetic-stripe {
    height: 40px;
    width: 100%;
    background: #334155;
    margin-top: 2rem;
}

.signature-area {
    width: 80%;
    height: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    margin: 1.5rem auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Brush Script MT', cursive;
    font-size: 1.4rem;
    color: #1e293b;
    border-radius: 4px;
}

.qr-area {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
}

.qr-code {
    width: 100px;
    height: 100px;
    mix-blend-mode: multiply;
    border: 4px solid white;
    border-radius: 8px;
}

.card-qr-text {
    font-size: 0.7rem;
    color: #64748b;
    font-family: monospace;
}

.disclaimer {
    font-size: 0.6rem;
    color: var(--color-text-muted);
    padding: 0 1.5rem 1.5rem;
    text-align: center;
    line-height: 1.5;
}

.disclaimer strong {
    color: var(--color-accent);
}

/* * GLOSS EFFECT */
.card__glare {
    position: absolute;
    inset: 0;
    z-index: 10;
    border-radius: 20px;
    background-image: radial-gradient(
        farthest-corner circle at var(--pointer-x) var(--pointer-y),
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.2) 30%,
        rgba(255, 255, 255, 0) 60%
    );
    opacity: var(--card-opacity);
    mix-blend-mode: overlay;
    pointer-events: none;
    will-change: opacity;
    transition: opacity 0.5s ease;
}

/* --- INTERACTIVE PROFILE LIST --- */

.profile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
    margin-top: 2rem;
    padding-bottom: 2rem; /* Spacing for scroll */
    position: relative;
    z-index: 50;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.profile-menu-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

/* Icon Container */
.menu-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

/* Default Colors */
.profile-menu-item .menu-icon-box {
    background-color: #f1f5f9;
    color: #64748b;
}

/* Hover Colors */
.profile-menu-item:hover .menu-icon-box {
    background-color: #e0e7ff;
    color: #4f46e5;
}

/* Text Styling */
.menu-text {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.menu-title {
    font-weight: 700;
    color: #334155;
    font-size: 0.9rem;
}

.menu-subtitle {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* Chevron */
.menu-chevron {
    color: #cbd5e1;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.profile-menu-item:hover .menu-chevron {
    color: #4f46e5;
    transform: translateX(4px);
}

/* Sign Out Specifics */
.profile-menu-item.danger-zone {
    border-color: #fee2e2;
    background: #fff;
    margin-top: 1rem;
}

.profile-menu-item.danger-zone:hover {
    background: #fef2f2;
    border-color: #fecaca;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1);
}

.profile-menu-item.danger-zone .menu-icon-box {
    background-color: #fee2e2;
    color: #ef4444;
}

.profile-menu-item.danger-zone:hover .menu-icon-box {
    background-color: #fecaca;
    color: #dc2626;
}

.profile-menu-item.danger-zone .menu-title {
    color: #ef4444;
}

/* Scrollable Container Overrides */
#profile-panel-content {
    overflow-y: auto; /* Enable vertical scroll */
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Hide scrollbar for cleaner look but keep functionality */
#profile-panel-content::-webkit-scrollbar {
    width: 6px;
}
#profile-panel-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}
#profile-panel-content::-webkit-scrollbar-track {
    background: transparent;
}

/* Hide scrollbar utility */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
}

/* AI Panel Animations */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}
.animate-blob {
    animation: blob 7s infinite;
}
.animation-delay-2000 {
    animation-delay: 2s;
}
.animation-delay-4000 {
    animation-delay: 4s;
}




