:root {
    --primary-red: #e52d27;
    --light-grey: #f4f4f6;
    --text-dark: #333333;
    --border-color: #dddddd;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body, html { height: 100%; background-color: var(--light-grey); overflow: hidden; }
.container { display: flex; height: 100vh; width: 100vw; }

.left-panel { flex: 1; background: linear-gradient(135deg, #b31217, var(--primary-red)); color: #ffffff; display: flex; flex-direction: column; justify-content: space-between; padding: 3rem; position: relative; }
.left-panel::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(rgba(0,0,0,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.06) 1px, transparent 1px); background-size: 40px 40px; pointer-events: none; }
.brand { font-size: 2rem; font-weight: 700; z-index: 2; }
.welcome-section { margin-top: auto; margin-bottom: auto; max-width: 500px; z-index: 2; }
.welcome-section h1 { font-size: 3rem; margin-bottom: 1rem; font-weight: 600; }
.welcome-section p { font-size: 1.1rem; opacity: 0.9; line-height: 1.5; margin-bottom: 2rem; }

/* Pre-Auth Home Voltage Display Card Module Style Layout */
.home-voltage-card { background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 12px; padding: 1.25rem; display: flex; align-items: center; gap: 1rem; backdrop-filter: blur(4px); max-width: 280px; }
.home-voltage-card .lightning-bolt { font-size: 2rem; background: #ffffff; color: #b31217; padding: 0.3rem 0.7rem; border-radius: 8px; font-weight: 700; }
.home-voltage-card small { font-size: 0.75rem; letter-spacing: 1px; opacity: 0.8; display: block; font-weight: 600; }
.home-voltage-card h2 { font-size: 1.8rem; margin: 0; font-weight: 700; color: #ffffff; }

.right-panel { flex: 1; display: flex; align-items: center; justify-content: center; background-color: #ffffff; padding: 2rem; position: relative; overflow-y: auto; }
.form-card { width: 100%; max-width: 440px; }
.form-row { display: flex; gap: 1rem; }
.form-row .input-group { flex: 1; }
.form-card h2 { color: var(--text-dark); font-size: 1.8rem; margin-bottom: 1.25rem; font-weight: 600; }
.input-group { margin-bottom: 1rem; }
.input-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.4rem; color: #666666; }
.input-group input { width: 100%; padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.95rem; outline: none; }
.input-group input:focus { border-color: var(--primary-red); }
.btn-submit { width: 100%; padding: 0.9rem; background-color: var(--primary-red); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; margin-top: 0.5rem; }
.toggle-text { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; color: #666; }
.toggle-text a { color: var(--primary-red); font-weight: 600; text-decoration: underline; }
.hidden { display: none !important; }

/* Dashboard Structural View Panels Styles Rules (Top-Left Logout / Top-Right Name) */
.dashboard-wrapper { width: 100%; height: 100%; display: flex; flex-direction: column; }
.dashboard-header-bar { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; width: 100%; }
.mini-logout-btn { background: #333333; color: #ffffff; border: none; padding: 0.5rem 1rem; border-radius: 6px; font-weight: 600; cursor: pointer; font-size: 0.85rem; }
.mini-logout-btn:hover { background: var(--primary-red); }
.user-greeting-right { color: var(--text-dark); font-weight: 700; font-size: 1rem; background: var(--light-grey); padding: 0.5rem 1rem; border-radius: 20px; border: 1px solid var(--border-color); }
.dashboard-scroll-content { flex: 1; overflow-y: auto; padding-right: 5px; }

/* Grid layout display parameters */
.metrics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin-bottom: 1.25rem; }
.metric-box { background: var(--light-grey); padding: 0.85rem; border-radius: 8px; border-left: 4px solid var(--primary-red); }
.metric-box .label { font-size: 0.75rem; color: #666; text-transform: uppercase; }
.metric-box .value { font-size: 1.3rem; font-weight: 700; color: var(--text-dark); margin-top: 0.2rem; }

.chart-container { background-color: #f9f9fb; padding: 1.25rem; border-radius: 12px; border: 1px solid var(--border-color); text-align: center; }
.chart-container h3 { font-size: 0.9rem; margin-bottom: 0.75rem; color: var(--text-dark); text-transform: uppercase; }
#usagePieChart { max-width: 220px !important; max-height: 220px !important; margin: 0 auto; }

@media(max-width: 768px) {
    .container { flex-direction: column; }
    .left-panel { padding: 2rem; min-height: 35vh; }
    .welcome-section h1 { font-size: 2rem; }
    .form-row { flex-direction: column; }
    .right-panel { padding: 1.5rem 1rem; overflow-y: auto; }
}
