/* ============================================================
 *  Phase 13a: Web Dashboard — Dark Theme Stylesheet
 *
 *  Farbschema:
 *    - Hintergrund:  #1a1a2e
 *    - Sidebar:      #16213e
 *    - Karten:       #0f3460
 *    - Akzent:       #533483
 *    - Text:         #e0e0e0
 * ============================================================ */

/* --- CSS Variablen --- */
:root {
    --bg-primary: #1a1a2e;
    --bg-sidebar: #16213e;
    --bg-card: #0f3460;
    --bg-input: #1a1a3e;
    --bg-hover: #1e2a4a;
    --accent: #533483;
    --accent-light: #6c44a0;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b8;
    --text-muted: #6c6c80;
    --border-color: #2a2a4e;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    --discord-blurple: #5865F2;
    --sidebar-width: 250px;
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --transition: 0.2s ease;
}

/* --- Reset & Basis --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
}

a {
    color: var(--accent-light);
    text-decoration: none;
}

a:hover {
    color: var(--text-primary);
}


/* ============================================================
 *  Sidebar
 * ============================================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border-right: 1px solid var(--border-color);
    transition: transform var(--transition);
}

.sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(83, 52, 131, 0.2);
    color: var(--text-primary);
    border-left-color: var(--accent);
}

.nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.nav-logout {
    margin-top: auto;
    border-top: 1px solid var(--border-color);
}

.sidebar-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    text-align: center;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--bg-sidebar);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 1.2rem;
    cursor: pointer;
}


/* ============================================================
 *  Hauptinhalt
 * ============================================================ */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 2rem;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}


/* ============================================================
 *  Karten / Tiles
 * ============================================================ */

.section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.subsection-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem;
    color: var(--text-secondary);
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.tile {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.tile:hover {
    transform: translateY(-2px);
}

.tile-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.tile-name {
    font-size: 1.05rem;
    font-weight: 600;
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-online {
    background: rgba(46, 204, 113, 0.2);
    color: var(--success);
}

.status-offline {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger);
}

.status-unknown {
    background: rgba(160, 160, 184, 0.2);
    color: var(--text-secondary);
}

.tile-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tile-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.stat-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.tile-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}


/* ============================================================
 *  Stats / Performance
 * ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.stat-card h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.stat-number {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.progress-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-ok {
    background: var(--success);
}

.progress-warning {
    background: var(--warning);
}

.progress-danger {
    background: var(--danger);
}


/* ============================================================
 *  Bot-Status Leiste
 * ============================================================ */

.bot-status-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.bot-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 200px;
}

.bot-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.indicator-online {
    background: var(--success);
    box-shadow: 0 0 6px var(--success);
}

.indicator-offline {
    background: var(--danger);
}

.indicator-unknown {
    background: var(--text-muted);
}

.bot-info {
    display: flex;
    flex-direction: column;
}

.bot-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.bot-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
}


/* ============================================================
 *  Ereignis-Feed
 * ============================================================ */

.event-list {
    list-style: none;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.event-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    min-width: 140px;
    font-family: monospace;
}

.event-type {
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.badge-info { background: rgba(52, 152, 219, 0.2); color: var(--info); }
.badge-warning { background: rgba(243, 156, 18, 0.2); color: var(--warning); }
.badge-error { background: rgba(231, 76, 60, 0.2); color: var(--danger); }
.badge-success { background: rgba(46, 204, 113, 0.2); color: var(--success); }

.event-message {
    flex: 1;
    color: var(--text-primary);
}

.empty-text {
    color: var(--text-secondary);
    text-align: center;
    padding: 1rem;
}


/* ============================================================
 *  Tabellen
 * ============================================================ */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.data-table th {
    background: var(--bg-sidebar);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.row-error {
    border-left: 3px solid var(--danger);
}

.row-warning {
    border-left: 3px solid var(--warning);
}

.empty-row {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem 1rem !important;
}

.col-timestamp {
    white-space: nowrap;
    font-family: monospace;
    font-size: 0.8rem;
    min-width: 150px;
}

.col-bot {
    min-width: 120px;
}

.col-level {
    min-width: 80px;
}

.col-message {
    word-break: break-word;
}

.level-badge {
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 700;
}

.level-error {
    background: rgba(231, 76, 60, 0.2);
    color: var(--danger);
}

.level-warning {
    background: rgba(243, 156, 18, 0.2);
    color: var(--warning);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.filter-info {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
}


/* ============================================================
 *  Buttons
 * ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn:hover {
    filter: brightness(1.15);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-secondary {
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #1a1a2e;
}

.btn-discord {
    background: var(--discord-blurple);
    color: white;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border-radius: var(--radius);
}

.btn-discord:hover {
    background: #4752c4;
    color: white;
}

.btn-sm {
    padding: 0.3rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}


/* ============================================================
 *  Formulare
 * ============================================================ */

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Toggle Switches */
.toggle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.toggle-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-label {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: white;
}

/* Config-Tabs (wiederverwendbar fuer alle Tab-Navigationen) */
.config-tabs,
.tab-nav,
.detail-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.config-tab,
.tab-btn,
.detail-tab {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    margin-bottom: -2px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    white-space: nowrap;
}

.config-tab:hover,
.tab-btn:hover,
.detail-tab:hover {
    color: var(--text-primary);
    background: rgba(83, 52, 131, 0.1);
}

.config-tab.active,
.tab-btn.active,
.detail-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent);
    background: rgba(83, 52, 131, 0.15);
    font-weight: 600;
}

/* Tab-Inhaltsbereich */
.tab-content {
    min-height: 200px;
}

/* Config-Sektionen */
.config-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.config-section .section-title {
    margin-top: 0;
    border-bottom-color: var(--border-color);
}

/* Config Form-Aktionen Buttons */
.config-form .form-actions .btn {
    min-width: 200px;
}

/* Stat-Label und Sub fuer System-Seite */
.stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stat-sub {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}


/* ============================================================
 *  Alerts / Meldungen
 * ============================================================ */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.15);
    color: var(--danger);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.alert-success {
    background: rgba(46, 204, 113, 0.15);
    color: var(--success);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.alert-warning {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
    border: 1px solid rgba(243, 156, 18, 0.3);
}


/* ============================================================
 *  Login-Seite (Standalone, ohne Sidebar)
 * ============================================================ */

.login-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.login-divider span {
    padding: 0 1rem;
}

.login-form .form-group {
    margin-bottom: 0.75rem;
}

.login-footer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 1.5rem;
}


/* ============================================================
 *  Webmin Iframe
 * ============================================================ */

.iframe-container {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.webmin-iframe {
    width: 100%;
    height: calc(100vh - 180px);
    border: none;
    background: var(--bg-card);
}


/* ============================================================
 *  Charts / Analytics
 * ============================================================ */

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1rem;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    min-height: 280px;
    position: relative;
}

.chart-card h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.chart-card canvas {
    max-height: 220px;
}

.chart-controls {
    display: flex;
    gap: 0.5rem;
}

.chart-period-btn.active {
    box-shadow: 0 0 8px rgba(83, 52, 131, 0.4);
}


/* ============================================================
 *  Sidebar — Server-Links / Separator
 * ============================================================ */

.nav-separator {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.nav-sub {
    padding-left: 2rem;
    font-size: 0.85rem;
}

.nav-sub .nav-icon {
    font-size: 0.7rem;
    color: var(--text-muted);
}


/* ============================================================
 *  HTMX Loading Indicator
 * ============================================================ */

.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Lade-Animation fuer Buttons und Bereiche */
.htmx-request {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.htmx-request::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 0.75rem;
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ============================================================
 *  RCON Console
 * ============================================================ */

.rcon-line {
    padding: 0.3rem 0.5rem;
    font-family: "Fira Code", "Cascadia Mono", "Consolas", monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.rcon-timestamp {
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.rcon-input {
    color: var(--accent-light);
    font-weight: 600;
}

.rcon-response .rcon-output {
    color: var(--success);
}

.rcon-error .rcon-output,
.rcon-error {
    color: var(--danger);
}


/* ============================================================
 *  Toast / Benachrichtigungen
 * ============================================================ */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    min-width: 280px;
    max-width: 400px;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info { border-left: 3px solid var(--info); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}


/* ============================================================
 *  Responsive Design
 * ============================================================ */

@media (max-width: 1024px) {
    .tile-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .config-tabs,
    .tab-nav,
    .detail-tabs {
        gap: 0.15rem;
    }

    .config-tab,
    .tab-btn,
    .detail-tab {
        padding: 0.5rem 0.7rem;
        font-size: 0.75rem;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-top: 4rem;
    }

    .tile-grid {
        grid-template-columns: 1fr;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }

    .bot-status-bar {
        flex-direction: column;
    }

    .toggle-grid {
        grid-template-columns: 1fr;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .event-item {
        flex-wrap: wrap;
    }

    .event-time {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .login-card {
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }
}
