/* Copyright (c) 2025 William Chesher | MIT License */
/* microverse admin - based on Hielo template by TEMPLATED (CC BY 3.0) */

/* Import shared shell styles (header, nav, color schemes, dark theme) */
@import './shell.css';

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base */
html, body {
    min-height: 100vh;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.75;
    color: #444;
    background: #f5f5f5;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.4em;
    text-transform: lowercase;
}

h1 { font-size: 1.5em; }
h2 { font-size: 1.25em; }
h3 { font-size: 1.1em; }

/* Main page titles - large and prominent */
main > h1,
.page-header h1 {
    font-size: 2.2em;
    margin-bottom: 0.5em;
}

main > h1 i,
.page-header h1 i {
    font-size: 1em;
    color: var(--accent);
    margin-right: 0.3em;
}

p {
    margin-bottom: 1em;
}

/* Header and navigation styles are in shell.css */

/* Notification Bell */
.notification-bell {
    position: relative;
}

.notification-bell .bell-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #888;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell .bell-button:hover {
    color: var(--accent);
}

.notification-bell .bell-button .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    z-index: 1000;
    overflow: hidden;
}

.notification-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-dropdown .dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 500;
}

.notification-dropdown .dropdown-header button {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 12px;
}

.notification-dropdown .dropdown-content {
    max-height: 340px;
    overflow-y: auto;
}

.notification-dropdown .empty-state {
    padding: 32px;
    text-align: center;
    color: #888;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f8f8f8;
}

.notification-item.unread {
    background: var(--accent-bg);
}

.notification-item.unread:hover {
    background: rgba(138, 79, 255, 0.15);
}

.notification-item.priority-high {
    border-left: 3px solid #ef4444;
}

.notification-item .notification-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.notification-item .notification-content {
    flex: 1;
    min-width: 0;
}

.notification-item .notification-title {
    font-weight: 500;
    font-size: 13px;
    color: #333;
    line-height: 1.3;
}

.notification-item .notification-message {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item .notification-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Main content */
main {
    padding: 4.5em 1.5em 1.5em 1.5em;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Cards - compact */
.card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 1em;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75em 1em;
    border-bottom: 1px solid #eee;
}

.card-header h2 {
    margin: 0;
    font-size: 1em;
    font-weight: 500;
}

/* Search input in tables */
.search-box {
    padding: 0.75em 1em;
    border-bottom: 1px solid #eee;
}

.search-box input {
    width: 100%;
    max-width: 300px;
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent);
}

body.dark-theme .search-box {
    border-color: #2a3a55;
}

body.dark-theme .search-box input {
    background: #16213e;
    border-color: #2a3a55;
    color: #e0e0e0;
}

/* Bulk actions bar */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75em 1em;
    background: var(--accent-bg);
    border-bottom: 1px solid #eee;
}

.bulk-actions span {
    font-weight: 500;
    color: var(--accent);
}

body.dark-theme .bulk-actions {
    background: rgba(138, 79, 255, 0.15);
    border-color: #2a3a55;
}

/* Stats grid - compact horizontal layout */
.stats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75em;
    margin-bottom: 1.25em;
}

/* Soft neon palette for stat cards - prominent display */
.stat-card {
    background: #fff;
    border: 1px solid rgba(196, 124, 255, 0.3);
    border-radius: 8px;
    padding: 1.25em 1.5em;
    display: flex;
    align-items: center;
    gap: 1em;
    color: #333;
    transition: box-shadow 0.2s, border-color 0.2s;
    min-width: 180px;
    flex: 1;
}

.stat-card:hover {
    box-shadow: 0 2px 8px rgba(196, 124, 255, 0.2);
}

/* Soft neon: purple (devices) */
.stat-card .stat-icon {
    color: #c47cff;
    font-size: 2.5rem;
    flex-shrink: 0;
}

/* Soft neon: blue (control) */
.stat-card.alt {
    border-color: rgba(124, 200, 255, 0.4);
}

.stat-card.alt:hover {
    box-shadow: 0 2px 8px rgba(124, 200, 255, 0.25);
}

.stat-card.alt .stat-icon {
    color: #7cc8ff;
}

/* Soft neon: cyan (sensing) */
.stat-card.success {
    border-color: rgba(124, 255, 220, 0.4);
}

.stat-card.success:hover {
    box-shadow: 0 2px 8px rgba(124, 255, 220, 0.25);
}

.stat-card.success .stat-icon {
    color: #7cffdc;
}

/* Soft neon: peach (events) */
.stat-card.warning {
    border-color: rgba(255, 176, 124, 0.4);
}

.stat-card.warning:hover {
    box-shadow: 0 2px 8px rgba(255, 176, 124, 0.25);
}

.stat-card.warning .stat-icon {
    color: #ffb07c;
}

.stat-card .number {
    font-size: 2em;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

.stat-card .label {
    font-size: 0.9em;
    color: #666;
    text-transform: lowercase;
}

/* Tables - compact */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

th, td {
    text-align: left;
    padding: 0.5em 0.75em;
    border-bottom: 1px solid #eee;
}

th {
    font-weight: 500;
    color: #888;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

tr:hover {
    background: #fafafa;
}

/* Status badges - monochrome pills */
.badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    border-radius: 20px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: lowercase;
    background: #222;
    color: #fff;
}

/* Device badge - monospace font */
.badge.device {
    font-family: 'Roboto Mono', monospace;
}

/* Buttons */
.button, button, input[type="submit"] {
    display: inline-block;
    padding: 0.75em 1.5em;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    font-weight: 500;
    text-transform: lowercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.button:hover, button:hover, input[type="submit"]:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.button.alt {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.button.alt:hover {
    background: var(--accent);
    color: #fff;
}

.button.small {
    padding: 0.4em 0.8em;
    font-size: 0.8em;
}

.button.danger {
    background: #e53935;
}

.button.danger:hover {
    background: #c62828;
}

/* Icon-only round buttons - standard action set */
.icon-btn,
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    background: #f0f0f0;
    color: #666;
}

.icon-btn:hover,
.btn-icon:hover {
    background: #e0e0e0;
    color: #333;
}

.icon-btn:disabled,
.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.icon-btn:disabled:hover,
.btn-icon:disabled:hover {
    background: #f0f0f0;
    color: #666;
}

/* Icon button variants */
.icon-btn.refresh,
.btn-icon.refresh {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}
.icon-btn.refresh:hover,
.btn-icon.refresh:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.icon-btn.delete,
.btn-icon.delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}
.icon-btn.delete:hover,
.btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.icon-btn.edit,
.btn-icon.edit {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}
.icon-btn.edit:hover,
.btn-icon.edit:hover {
    background: rgba(168, 85, 247, 0.2);
    color: #9333ea;
}

.icon-btn.disable,
.btn-icon.disable {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}
.icon-btn.disable:hover,
.btn-icon.disable:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.icon-btn.enable,
.btn-icon.enable {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}
.icon-btn.enable:hover,
.btn-icon.enable:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.icon-btn.next,
.icon-btn.prev,
.btn-icon.next,
.btn-icon.prev {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}
.icon-btn.next:hover,
.icon-btn.prev:hover,
.btn-icon.next:hover,
.btn-icon.prev:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #4b5563;
}

/* Additional icon button variants */
.icon-btn.view,
.btn-icon.view {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}
.icon-btn.view:hover,
.btn-icon.view:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

.icon-btn.copy,
.btn-icon.copy {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}
.icon-btn.copy:hover,
.btn-icon.copy:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #4b5563;
}

.icon-btn.settings,
.btn-icon.settings {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}
.icon-btn.settings:hover,
.btn-icon.settings:hover {
    background: rgba(107, 114, 128, 0.2);
    color: #4b5563;
}

.icon-btn.add,
.btn-icon.add {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}
.icon-btn.add:hover,
.btn-icon.add:hover {
    background: rgba(34, 197, 94, 0.2);
    color: #16a34a;
}

.icon-btn.sync,
.btn-icon.sync {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}
.icon-btn.sync:hover,
.btn-icon.sync:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.icon-btn.login,
.btn-icon.login {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}
.icon-btn.login:hover,
.btn-icon.login:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #4f46e5;
}

.icon-btn.key,
.btn-icon.key {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}
.icon-btn.key:hover,
.btn-icon.key:hover {
    background: rgba(168, 85, 247, 0.2);
    color: #9333ea;
}

/* Icon button sizes */
.icon-btn.sm,
.btn-icon.sm {
    width: 24px;
    height: 24px;
    font-size: 0.75rem;
}

.icon-btn.lg,
.btn-icon.lg {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

/* Dark theme icon buttons */
body.dark-theme .icon-btn,
body.dark-theme .btn-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}
body.dark-theme .icon-btn:hover,
body.dark-theme .btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
body.dark-theme .icon-btn:disabled:hover,
body.dark-theme .btn-icon:disabled:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #aaa;
}
body.dark-theme .icon-btn.refresh,
body.dark-theme .btn-icon.refresh {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
body.dark-theme .icon-btn.refresh:hover,
body.dark-theme .btn-icon.refresh:hover {
    background: rgba(59, 130, 246, 0.25);
}
body.dark-theme .icon-btn.delete,
body.dark-theme .btn-icon.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}
body.dark-theme .icon-btn.delete:hover,
body.dark-theme .btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.25);
}
body.dark-theme .icon-btn.edit,
body.dark-theme .btn-icon.edit {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}
body.dark-theme .icon-btn.edit:hover,
body.dark-theme .btn-icon.edit:hover {
    background: rgba(168, 85, 247, 0.25);
}
body.dark-theme .icon-btn.disable,
body.dark-theme .btn-icon.disable {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}
body.dark-theme .icon-btn.disable:hover,
body.dark-theme .btn-icon.disable:hover {
    background: rgba(245, 158, 11, 0.25);
}
body.dark-theme .icon-btn.enable,
body.dark-theme .btn-icon.enable {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
body.dark-theme .icon-btn.enable:hover,
body.dark-theme .btn-icon.enable:hover {
    background: rgba(34, 197, 94, 0.25);
}
body.dark-theme .icon-btn.next,
body.dark-theme .icon-btn.prev,
body.dark-theme .btn-icon.next,
body.dark-theme .btn-icon.prev {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}
body.dark-theme .icon-btn.next:hover,
body.dark-theme .icon-btn.prev:hover,
body.dark-theme .btn-icon.next:hover,
body.dark-theme .btn-icon.prev:hover {
    background: rgba(156, 163, 175, 0.25);
}
body.dark-theme .icon-btn.view,
body.dark-theme .btn-icon.view {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}
body.dark-theme .icon-btn.view:hover,
body.dark-theme .btn-icon.view:hover {
    background: rgba(99, 102, 241, 0.25);
}
body.dark-theme .icon-btn.copy,
body.dark-theme .icon-btn.settings,
body.dark-theme .btn-icon.copy,
body.dark-theme .btn-icon.settings {
    background: rgba(156, 163, 175, 0.15);
    color: #9ca3af;
}
body.dark-theme .icon-btn.copy:hover,
body.dark-theme .icon-btn.settings:hover,
body.dark-theme .btn-icon.copy:hover,
body.dark-theme .btn-icon.settings:hover {
    background: rgba(156, 163, 175, 0.25);
}
body.dark-theme .icon-btn.add,
body.dark-theme .btn-icon.add {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
body.dark-theme .icon-btn.add:hover,
body.dark-theme .btn-icon.add:hover {
    background: rgba(34, 197, 94, 0.25);
}
body.dark-theme .icon-btn.sync,
body.dark-theme .btn-icon.sync {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}
body.dark-theme .icon-btn.sync:hover,
body.dark-theme .btn-icon.sync:hover {
    background: rgba(59, 130, 246, 0.25);
}
body.dark-theme .icon-btn.login,
body.dark-theme .btn-icon.login {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}
body.dark-theme .icon-btn.login:hover,
body.dark-theme .btn-icon.login:hover {
    background: rgba(99, 102, 241, 0.25);
}
body.dark-theme .icon-btn.key,
body.dark-theme .btn-icon.key {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}
body.dark-theme .icon-btn.key:hover,
body.dark-theme .btn-icon.key:hover {
    background: rgba(168, 85, 247, 0.25);
}

/* Legacy support */
.button.icon-round {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
}

.button.icon-round.delete {
    background: #e74c3c;
    color: #fff;
}

.button.icon-round.delete:hover {
    background: #c0392b;
}

/* Forms */
.form-group {
    margin-bottom: 1.25em;
}

.form-group label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 500;
    color: #555;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 0.75em 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-bg);
}

/* Form hints and errors */
.form-hint {
    font-size: 0.8em;
    color: #888;
    margin-top: 0.35em;
}

.form-error {
    font-size: 0.8em;
    color: #e53935;
    margin-top: 0.35em;
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #e53935;
}

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.15);
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 0.5em;
}

.breadcrumbs a {
    color: #666;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--accent);
}

.breadcrumbs .separator {
    margin: 0 0.5em;
    color: #ccc;
}

/* Page header - breadcrumbs left, title right */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
}

.page-header .breadcrumbs {
    margin-bottom: 0;
}

.page-header h1 {
    margin-bottom: 0;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: #333;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: toast-in 0.3s ease-out;
    max-width: 400px;
}

.toast.success {
    background: #22c55e;
}

.toast.error {
    background: #ef4444;
}

.toast.warning {
    background: #f59e0b;
}

.toast .toast-icon {
    font-size: 1.1em;
}

.toast .toast-message {
    flex: 1;
}

.toast .toast-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0;
    font-size: 1em;
}

.toast .toast-close:hover {
    opacity: 1;
}

@keyframes toast-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Loading skeletons */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-circle {
    border-radius: 50%;
}

.skeleton-card {
    padding: 1rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

body.dark-theme .skeleton {
    background: linear-gradient(90deg, #2a3a55 25%, #1f2940 50%, #2a3a55 75%);
    background-size: 200% 100%;
}

body.dark-theme .skeleton-card {
    background: #1f2940;
    border-color: #2a3a55;
}

body.dark-theme .skeleton-row {
    border-bottom-color: #2a3a55;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #888;
}

.empty-state .empty-icon {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state .empty-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state .empty-message {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
}

body.dark-theme .empty-state .empty-icon {
    color: #3a4a6a;
}

body.dark-theme .empty-state .empty-title {
    color: #aaa;
}

body.dark-theme .empty-state .empty-message {
    color: #888;
}

/* Login page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 3em;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 0.25em;
}

.login-box .subtitle {
    text-align: center;
    color: #888;
    margin-bottom: 2em;
}

.login-box .error {
    background: #ffebee;
    color: #c62828;
    padding: 0.75em 1em;
    border-radius: 4px;
    margin-bottom: 1em;
    font-size: 0.9em;
    display: none;
}

.login-box .error.show {
    display: block;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 8px;
    padding: 2em;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    margin-bottom: 1em;
}

.modal-actions {
    display: flex;
    gap: 1em;
    justify-content: flex-end;
    margin-top: 1.5em;
}

/* Alerts */
.alert {
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1em;
}

.alert.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.alert.error {
    background: #ffebee;
    color: #c62828;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5em;
}

/* Token display */
.token-display {
    background: #f5f5f5;
    padding: 1em;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9em;
    word-break: break-all;
    margin: 0;
    flex: 1;
}

.token-display-row {
    display: flex;
    gap: 0.5em;
    align-items: stretch;
}

.token-display-row .button {
    flex-shrink: 0;
    align-self: center;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2em;
    color: #888;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3em;
    color: #888;
}

/* Layout modes (fullscreen, iframe) are in shell.css */

/* Responsive */
@media (max-width: 768px) {
    #header {
        padding: 0 1em;
    }

    #header nav {
        display: none;
    }

    main {
        padding: 4em 1em 1em 1em;
    }

    .stats-grid {
        gap: 0.5em;
    }

    .stat-card {
        min-width: 140px;
        padding: 1em 1.25em;
    }

    .modal {
        margin: 1em;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        flex-direction: column;
    }

    .stat-card {
        width: 100%;
    }
}

/* Site footer */
.site-footer {
    text-align: center;
    padding: 2em 1em;
    margin-top: 2em;
    border-top: 1px solid #eee;
    color: #888;
    font-size: 0.85em;
}

.site-footer a {
    color: #666;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent);
}

.site-footer .separator {
    margin: 0 0.5em;
    color: #ccc;
}

/* ============================================
   Dark Theme - Page Content Styles
   Shell/header dark theme styles are in shell.css
   ============================================ */

/* Dark theme: Notification bell */
body.dark-theme .notification-bell .bell-button {
    color: #aaa;
}

body.dark-theme .notification-dropdown {
    background: #1f2940;
    border: 1px solid #2a3a55;
}

body.dark-theme .notification-dropdown .dropdown-header {
    border-color: #2a3a55;
    color: #eee;
}

body.dark-theme .notification-item {
    border-color: #2a3a55;
}

body.dark-theme .notification-item:hover {
    background: #2a3a55;
}

body.dark-theme .notification-item.unread {
    background: rgba(138, 79, 255, 0.15);
}

body.dark-theme .notification-item .notification-title {
    color: #eee;
}

body.dark-theme .notification-item .notification-message {
    color: #aaa;
}

body.dark-theme .notification-dropdown .empty-state {
    color: #aaa;
}

/* Dark theme: Content area */
body.dark-theme main h1,
body.dark-theme main h2,
body.dark-theme main h3 {
    color: #eee;
}

body.dark-theme .card,
body.dark-theme .profile-card,
body.dark-theme .dashboard-card {
    background: #1f2940;
    border-color: #2a3a55;
}

body.dark-theme .card-header {
    border-color: #2a3a55;
}

body.dark-theme table {
    background: #1f2940;
}

body.dark-theme table th {
    background: #16213e;
    color: #ccc;
}

body.dark-theme table td {
    border-color: #2a3a55;
    color: #ddd;
}

body.dark-theme table tr:hover td {
    background: #2a3a55;
}

/* Dark theme stat-cards with soft neon glow */
body.dark-theme .stat-card {
    background: #1f2940;
    border: 1px solid rgba(196, 124, 255, 0.4);
    box-shadow: 0 0 8px rgba(196, 124, 255, 0.1);
}

body.dark-theme .stat-card:hover {
    box-shadow: 0 0 12px rgba(196, 124, 255, 0.2);
    border-color: rgba(196, 124, 255, 0.6);
}

body.dark-theme .stat-card .stat-icon {
    color: #c47cff;
}

body.dark-theme .stat-card .number {
    color: #eee;
}

body.dark-theme .stat-card .label {
    color: #aaa;
}

/* Dark theme: soft neon blue card */
body.dark-theme .stat-card.alt {
    border-color: rgba(124, 200, 255, 0.4);
    box-shadow: 0 0 8px rgba(124, 200, 255, 0.1);
}

body.dark-theme .stat-card.alt:hover {
    box-shadow: 0 0 12px rgba(124, 200, 255, 0.2);
    border-color: rgba(124, 200, 255, 0.6);
}

body.dark-theme .stat-card.alt .stat-icon {
    color: #7cc8ff;
}

/* Dark theme: soft neon cyan card */
body.dark-theme .stat-card.success {
    border-color: rgba(124, 255, 220, 0.4);
    box-shadow: 0 0 8px rgba(124, 255, 220, 0.1);
}

body.dark-theme .stat-card.success:hover {
    box-shadow: 0 0 12px rgba(124, 255, 220, 0.2);
    border-color: rgba(124, 255, 220, 0.6);
}

body.dark-theme .stat-card.success .stat-icon {
    color: #7cffdc;
}

/* Dark theme: soft neon peach card */
body.dark-theme .stat-card.warning {
    border-color: rgba(255, 176, 124, 0.4);
    box-shadow: 0 0 8px rgba(255, 176, 124, 0.1);
}

body.dark-theme .stat-card.warning:hover {
    box-shadow: 0 0 12px rgba(255, 176, 124, 0.2);
    border-color: rgba(255, 176, 124, 0.6);
}

body.dark-theme .stat-card.warning .stat-icon {
    color: #ffb07c;
}

/* Dark theme badges - inverted monochrome */
body.dark-theme .badge {
    background: #eee;
    color: #222;
}

/* Dark theme footer */
body.dark-theme .site-footer {
    border-color: #2a3a55;
    color: #666;
}

body.dark-theme .site-footer a {
    color: #888;
}

body.dark-theme .site-footer .separator {
    color: #444;
}

body.dark-theme .button {
    background: var(--accent);
}

body.dark-theme .button.alt {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

body.dark-theme input[type="text"],
body.dark-theme input[type="password"],
body.dark-theme input[type="email"],
body.dark-theme select,
body.dark-theme textarea {
    background: #16213e;
    border-color: #2a3a55;
    color: #ddd;
}

body.dark-theme input:focus,
body.dark-theme select:focus,
body.dark-theme textarea:focus {
    border-color: var(--accent);
}

body.dark-theme .toggle-group {
    border-color: #2a3a55;
}

body.dark-theme .toggle-group button {
    background: #1f2940;
    color: #aaa;
}

body.dark-theme .toggle-group button:hover:not(.active) {
    background: #2a3a55;
}

body.dark-theme .form-group label {
    color: #bbb;
}

body.dark-theme .info-row .label {
    color: #888;
}

body.dark-theme .info-row .value {
    color: #ddd;
}

body.dark-theme .preference-label {
    color: #ddd;
}

body.dark-theme .preference-label .desc {
    color: #888;
}

body.dark-theme .preference-row {
    border-color: #2a3a55;
}

body.dark-theme .alert.success {
    background: #1f3a2e;
    color: #6dbe6d;
    border-color: #2a5a3a;
}

body.dark-theme .alert.error {
    background: #3a1f2e;
    color: #d67070;
    border-color: #5a2a3a;
}

body.dark-theme .theme-selector {
    background: #16213e;
}

body.dark-theme .theme-selector label {
    color: #ddd;
}

body.dark-theme .theme-toggle {
    border-color: #2a3a55;
}

body.dark-theme .theme-toggle button {
    background: #1f2940;
    color: #aaa;
}

body.dark-theme .theme-toggle button:hover:not(.active) {
    background: #2a3a55;
}

/* Dark theme: Visualization config page */
body.dark-theme .component-card {
    background: #1f2940;
    border-color: #2a3a55;
}

body.dark-theme .component-card h3 {
    color: #eee;
}

body.dark-theme .component-card .version {
    color: #aaa;
}

body.dark-theme .config-item {
    border-color: #2a3a55;
}

body.dark-theme .config-item .label {
    color: #aaa;
}

body.dark-theme .config-item .value {
    color: #ddd;
}

body.dark-theme .endpoint-item {
    background: #16213e;
    color: #ddd;
}

body.dark-theme .endpoint-item code {
    color: #ddd;
}

body.dark-theme .endpoint-item span {
    color: #aaa;
}

/* Dark theme: Modals */
body.dark-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-theme .modal {
    background: #1f2940;
    border: 1px solid #2a3a55;
    color: #e0e0e0;
}

body.dark-theme .modal h2,
body.dark-theme .modal h3 {
    color: #eee;
}

body.dark-theme .modal .form-group label {
    color: #bbb;
}

body.dark-theme .modal .modal-actions {
    border-top-color: #2a3a55;
}

/* Dark theme: Empty states */
body.dark-theme .empty-state {
    color: #888;
}

/* Dark theme: Breadcrumbs */
body.dark-theme .breadcrumbs {
    color: #888;
}

body.dark-theme .breadcrumbs a {
    color: #aaa;
}

body.dark-theme .breadcrumbs a:hover {
    color: var(--accent);
}

/* Dark theme: Form hints and errors */
body.dark-theme .form-hint {
    color: #888;
}

body.dark-theme .form-error {
    color: #f87171;
}

/* Dark theme: Toast notifications */
body.dark-theme .toast {
    background: #2a3a55;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
