/* AlertForge - Glassmorphism Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: rgba(255, 255, 255, 0.04);
    --bg-tertiary: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #e8ecf4;
    --text-secondary: #8b95a8;
    --text-muted: #5a6478;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-glow: rgba(96, 165, 250, 0.3);
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #60a5fa;
}

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

html {
    color-scheme: dark;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #0f1729 25%, #121832 50%, #0d1424 75%, #0a0e1a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

body::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    top: -200px;
    right: -100px;
}

body::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(50px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 40px) scale(0.9); }
}

/* Navigation */
.top-nav {
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid var(--glass-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    height: 52px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links {
    display: flex;
    gap: 0.125rem;
    flex: 1;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(96, 165, 250, 0.12);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.1);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-user span:first-child { display: none; }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.375rem;
    letter-spacing: -0.5px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Glass Cards */
.card {
    background: var(--glass-bg);
    -webkit-
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--glass-border-hover);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.card-header p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-label.required::after {
    content: " *";
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.2s ease;
    -webkit-
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow),
                0 0 20px rgba(96, 165, 250, 0.1);
    background: rgba(255, 255, 255, 0.06);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

select.form-control {
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

select.form-control option {
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.5rem;
}

select.form-control option:checked {
    background: #3b82f6;
    color: #ffffff;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Sections */
.section-divider {
    margin: 1.75rem 0;
    border-top: 1px solid var(--glass-border);
    padding-top: 1.5rem;
}

.section-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-style: italic;
}

/* Glass Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--glass-border-hover);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0;
    background: none;
    border: none;
}

.btn-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Glass Alerts */
.alert {
    padding: 0.875rem 1.125rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    border: 1px solid;
    font-size: 0.8125rem;
    -webkit-
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.1);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

/* Glass Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    -webkit-
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-warning {
    background: rgba(234, 179, 8, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.info-card {
    background: var(--glass-bg);
    -webkit-
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.info-card h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.stat-value {
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 0 10px var(--accent-glow);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    -webkit-
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.15);
    transform: translateY(-2px);
}

/* Status */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    -webkit-
}

.status-configured {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.status-not-configured {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

/* Loading */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Responsive */
@media (max-width: 1024px) {
    .grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .top-nav { flex-direction: column; height: auto; padding: 0.75rem 1rem; gap: 0.75rem; }
    .nav-links { width: 100%; justify-content: center; flex-wrap: wrap; }
    .container, .container-narrow { padding: 1rem; }
    .card { padding: 1.25rem; }
    .form-row { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
}
