/* General Styling */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: 1px solid rgba(255, 255, 255, 0.18);
    --text-color: #f0f0f0;
    --blur-amount: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Keyframe Animations --- */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #1a1a2e; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: #fff;
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

#splash-screen.hidden {
    opacity: 0;
    transform: scale(0.95); 
    pointer-events: none; 
}

/* NEW: This class hides the splash screen immediately, no animation */
#splash-screen.immediate-hide {
    opacity: 0;
    display: none;
    transition: none;
}

/* MODIFIED: Targets your <svg> tag as well as the text */
.splash-logo,
#splash-screen h1 {
    opacity: 0; /* Start hidden */
}

/* This targets the SVG <g> tags inside your logo */
.splash-logo g {
    animation: scaleIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

/* MODIFIED: Your new index.html uses an <img> tag, let's animate that */
#splash-screen img {
     animation: scaleIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

#splash-screen h1 {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 1px;
    animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}


/* Header & User Profile */
.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border-bottom: var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.portal-header .logo h1 {
    font-weight: 700;
}

/* Live Date/Time Styles */
.live-datetime {
    text-align: center;
    color: var(--text-color);
}

#live-time {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 1px;
}

#live-date {
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.8;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-profile img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    object-fit: cover;
}

.user-profile .user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.user-info #user-name {
    font-weight: 700;
}

.user-info #user-emp-id {
    font-size: 0.85rem;
    opacity: 0.8;
}

.logout-button {
    text-decoration: none;
    color: #ffcdd2;
    background: rgba(239, 83, 80, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: rgba(239, 83, 80, 0.4);
    box-shadow: 0 0 10px rgba(239, 83, 80, 0.3);
}

/* Tool Grid */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Tool Card - Glassmorphism */
.tool-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    border: var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.tool-card .card-icon {
    height: 50px; 
    margin-bottom: 1rem;
}

/* Style for the dynamic <img> icons */
.tool-card .card-icon img {
    height: 100%;
    width: auto;
    max-width: 100%;
    /* filter: invert(1) brightness(2); -- REMOVED */
}

/* Style for the inline <svg> admin icons */
.tool-card .card-icon svg {
    height: 100%;
    width: auto;
    max-width: 100%;
    fill: #ffffff; /* Ensures the SVG is white */
}


.tool-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tool-card p {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 900px) { 
    .portal-header {
        flex-direction: column;
        gap: 1.5rem; 
    }

    .live-datetime {
        order: -1; 
    }
    
    .tool-grid {
        padding: 1.5rem;
    }
}