/* ==========================================================================
   MODERN LIGHT THEME DASHBOARD CSS
   ========================================================================== */

:root {
    --bg-color: #f3f4f6;       /* Soft light gray/blue background */
    --panel-bg: #ffffff;       /* Pure white for panels */
    --primary-blue: #2563eb;   /* Vibrant modern blue */
    --primary-cyan: #06b6d4;   /* Clean cyan */
    --primary-green: #10b981;  /* Fresh green */
    --primary-purple: #8b5cf6; /* Soft purple */
    --primary-pink: #ec4899;   /* Soft pink */
    
    --text-main: #1f2937;      /* Dark slate for high contrast/readability */
    --text-muted: #64748b;     /* Medium gray for secondary text */
    --border-color: #e2e8f0;   /* Light gray for subtle borders */
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* Dashboard Container */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 140px;
    gap: 15px;
    width: 100%;
    max-width: 1100px;
}

/* Base Tile Styles */
.tile {
    background-color: var(--panel-bg);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    /* Soft modern drop shadow instead of inset dark shadow */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.tile:hover {
    transform: translateY(-4px); /* Lift effect instead of scale */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Variable Grid Spans for Large Widgets */
.span-2-w { grid-column: span 2; }
.span-2-h { grid-row: span 2; }
.span-3-w { grid-column: span 3; } 
.span-4-w { grid-column: span 4; } 

/* Icon Tweaks */
.tile i, .tile svg {
    margin: auto;
    display: block;
    width: 32px;
    height: 32px;
}

/* Text Element Styling */
.tile-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: var(--text-muted);
    width: 100%;
}

.tile-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin: auto;
}

.tile-subtext {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ==========================================================================
   Theme Color Classes (Light Soft Gradients)
   ========================================================================== */
.blue-theme { 
    background: linear-gradient(135deg, #eff6ff, #dbeafe); 
    border: 1px solid #0f488f;
}
.blue-theme .tile-value, .blue-theme svg { color: #1d4ed8; stroke: #1d4ed8; }

.purple-theme { 
    background: linear-gradient(135deg, #faf5ff, #f3e8ff); 
    border: 1px solid #541499;
}
.purple-theme .tile-value, .purple-theme svg { color: #7e22ce; stroke: #7e22ce; }
.purple-theme .tile-title { color: #9333ea; }

.pink-theme { 
    background: linear-gradient(135deg, #fdf2f8, #fce7f3); 
    border: 1px solid #ab1168;
}
.pink-theme .tile-value, .pink-theme svg { color: #be185d; stroke: #be185d; }

.cyan-theme { 
    background: linear-gradient(135deg, #ecfeff, #cffafe); 
    border: 1px solid #188895;
}
.cyan-theme .tile-value, .cyan-theme svg { color: #0e7490; stroke: #0e7490; }

/* Adding a new Green Theme based on your request */
.green-theme {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
}
.green-theme .tile-value, .green-theme svg { color: #047857; stroke: #047857; }

/* Kept class name "black-theme" for HTML compatibility, but styled it light/silver */
.black-theme {
    background: linear-gradient(135deg, #eefdf0, #c8f7dd);
    border: 1px solid #0c8d33;
}
.black-theme .tile-value { color: #0c8d33; }

/* ==========================================================================
   Specific Component Tweaks
   ========================================================================== */
.clock-widget {
    align-items: flex-start;
    justify-content: center;
    padding-left: 25px;
}

.weather-widget {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}
.weather-info {
    text-align: right;
}

.weather-widget svg {
    width: 40px;
    height: 40px;
}

.time {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
}

/* ==========================================================================
   COMPLETE LOGIN MODAL STYLES (Light Version)
   ========================================================================== */

/* Full Screen Overlay Cover - Lighter Blur */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.login-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

/* Ambient Ring behind Modal */
.glow-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    filter: blur(20px);
    z-index: 1;
    pointer-events: none;
}

/* Main UI Structural Panel - White Card */
.login-panel {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-close-btn svg {
    width: 20px;
    height: 20px;
}

/* Header Context Groupings */
.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.security-icon svg {
    color: var(--primary-blue);
    stroke: var(--primary-blue);
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
}

.system-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 3px;
    /* Clean gradient text */
    background: linear-gradient(to right, #1f2937, var(--primary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.system-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    margin-top: 4px;
    font-weight: 600;
}

/* Inputs Structure Setup */
.input-group {
    margin-bottom: 22px;
    text-align: left;
}

.field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 14px 15px 14px 45px;
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.25s ease;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    transition: color 0.25s ease;
}

/* Focus States */
.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper input:focus ~ .input-icon {
    color: var(--primary-blue);
}

/* Utilities Block */
.form-utilities {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 30px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    user-select: none;
    color: var(--text-muted);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 14px;
    width: 14px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    margin-right: 8px;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: var(--primary-blue);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 7px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.forgot-link {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary-blue);
}

/* Interactive Submission Element */
.login-btn {
    width: 100%;
    /* Gradient from Blue to Green */
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-green));
    border: none;
    border-radius: 6px;
    padding: 15px;
    color: #ffffff;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.login-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3);
    filter: brightness(1.05);
}

.login-btn:hover svg {
    transform: translateX(4px);
}

.login-btn:active {
    transform: translateY(0);
}

/* Remove underlines and link colors from layout tile links */
a.tile {
    text-decoration: none !important;
    color: inherit !important;
}