/* Base Reset & Variables */
* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Roboto, sans-serif; }
body { background-color: #e2e8f0; display: flex; justify-content: center; align-items: center; min-height: 100vh; }

/* Main Containers (Keeps Login working) */
.app-container, .login-container { width: 100%; max-width: 420px; background-color: #ffffff; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1); }
.login-container { padding: 40px 24px; border-radius: 24px; margin: 20px; }
.app-container { min-height: 100vh; padding: 32px 24px; position: relative; overflow: hidden; }

/* Dashboard Specific Background */
.dashboard-bg { background-color: #f8fafc; }

@media (min-width: 450px) {
    .app-container { min-height: 85vh; border-radius: 30px; margin: 20px; }
}

/* Forms & Inputs (Keeps Login working) */
.title { text-align: center; font-size: 1.8rem; color: #0f172a; margin-bottom: 30px; font-weight: 800; letter-spacing: -0.5px; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-size: 0.9rem; color: #475569; margin-bottom: 8px; font-weight: 600; }
.input-group input, .input-group select { width: 100%; padding: 14px; border: 2px solid #e2e8f0; border-radius: 12px; font-size: 1rem; outline: none; transition: all 0.2s; }
.input-group input:focus, .input-group select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.error-msg { color: #dc2626; text-align: center; font-size: 0.9rem; margin-top: 15px; display: none; }
.login-btn { width: 100%; padding: 16px; background: #2563eb; color: white; border: none; border-radius: 12px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; margin-top: 10px; }
.login-btn:hover { background: #1d4ed8; }

/* --- NEW DASHBOARD UI --- */

/* Header Profile Section */
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.profile-section { display: flex; align-items: center; gap: 12px; }
.avatar { width: 48px; height: 48px; background: linear-gradient(135deg, #eff6ff, #dbeafe); color: #2563eb; border-radius: 16px; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; }
.greeting { font-size: 0.85rem; color: #64748b; font-weight: 500; margin-bottom: 2px; }
#userName { color: #0f172a; font-size: 1.3rem; font-weight: 700; letter-spacing: -0.5px; }

/* Icon Buttons */
.icon-btn { background: #f1f5f9; border: none; width: 42px; height: 42px; border-radius: 12px; color: #475569; font-size: 1.4rem; cursor: pointer; display: flex; justify-content: center; align-items: center; transition: all 0.2s; }
.icon-btn:hover { background: #fee2e2; color: #dc2626; }

/* Primary Action Card */
.primary-card { background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%); border-radius: 20px; padding: 24px; display: flex; justify-content: space-between; align-items: center; color: white; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4); margin-bottom: 32px; }
.primary-card:active { transform: scale(0.97); }
.card-content h3 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.5px; }
.card-content p { color: #bfdbfe; font-size: 0.9rem; font-weight: 500; }
.card-icon { font-size: 2.5rem; color: rgba(255,255,255,0.9); }

/* Quick Access Section */
.section-title { color: #334155; font-size: 1.05rem; font-weight: 700; margin-bottom: 16px; letter-spacing: -0.2px; }
.modern-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* Grid Cards */
.grid-card { background: #ffffff; border-radius: 20px; padding: 20px 16px; display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; border: 1px solid #f1f5f9; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02); transition: all 0.2s ease; }
.grid-card:hover { transform: translateY(-4px); box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.05); border-color: #e2e8f0; }
    .grid-card:active { transform: translateY(0); }

/* Stylish Colored Icons inside Grid */
.icon-wrapper { width: 44px; height: 44px; border-radius: 12px; display: flex; justify-content: center; align-items: center; font-size: 1.6rem; margin-bottom: 16px; }
.icon-wrapper.blue { background: #eff6ff; color: #3b82f6; }
.icon-wrapper.purple { background: #faf5ff; color: #a855f7; }
.icon-wrapper.orange { background: #fff7ed; color: #f97316; }
.icon-wrapper.green { background: #f0fdf4; color: #22c55e; }

.grid-card span { color: #1e293b; font-size: 0.95rem; font-weight: 600; line-height: 1.3; }

/* Live Search Autocomplete Styles */
.autocomplete-wrapper { position: relative; }
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}
.autocomplete-item {
    padding: 12px 16px;
    font-size: 0.95rem;
    color: #334155;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
    font-weight: 500;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover { background: #eff6ff; color: #2563eb; }
