@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    /* Premium dark palette */
    --bg-void: #05060b;
    --bg-primary: #0a0c14;
    --bg-secondary: #0f1219;
    --bg-elevated: #141822;
    --bg-card: #181d2a;
    --bg-card-hover: #1e2436;
    --bg-surface: #232a3b;

    /* Glass */
    --glass-bg: rgba(20, 24, 34, 0.72);
    --glass-border: rgba(255, 255, 255, 0.06);
    --glass-shine: rgba(255, 255, 255, 0.03);

    /* Text hierarchy */
    --text-primary: #eef0f6;
    --text-secondary: #7a819a;
    --text-tertiary: #4d5470;
    --text-muted: #363d54;

    /* Brand gradient */
    --accent-start: #6c5ce7;
    --accent-end: #00cec9;
    --accent-gradient: linear-gradient(135deg, #6c5ce7 0%, #00cec9 100%);
    --accent-gradient-warm: linear-gradient(135deg, #fd79a8 0%, #fdcb6e 100%);
    --accent-gradient-danger: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);

    /* Semantic */
    --accent: #6c5ce7;
    --accent-hover: #5a4bd6;
    --success: #00b894;
    --success-soft: rgba(0, 184, 148, 0.12);
    --warning: #fdcb6e;
    --warning-soft: rgba(253, 203, 110, 0.12);
    --danger: #ff6b6b;
    --danger-soft: rgba(255, 107, 107, 0.12);
    --info: #74b9ff;
    --info-soft: rgba(116, 185, 255, 0.12);

    /* Borders & shadows */
    --border: rgba(255, 255, 255, 0.05);
    --border-strong: rgba(255, 255, 255, 0.08);
    --border-accent: rgba(108, 92, 231, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(108, 92, 231, 0.15);
    --shadow-danger-glow: 0 0 40px rgba(255, 107, 107, 0.2);

    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: 150ms var(--ease-out);
    --transition-normal: 250ms var(--ease-out);
    --transition-slow: 400ms var(--ease-out);
}

/* ======= RESET & BASE ======= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-void);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

::selection { background: rgba(108, 92, 231, 0.3); color: #fff; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); }

/* ======= LOGIN PAGE ======= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-void);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 206, 201, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(253, 121, 168, 0.04) 0%, transparent 50%);
    animation: auroraShift 20s ease-in-out infinite alternate;
}

@keyframes auroraShift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-5%, 3%) rotate(3deg); }
}

.login-container { width: 100%; max-width: 440px; padding: 24px; position: relative; z-index: 1; }

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(150%);
    -webkit-backdrop-filter: blur(40px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(108, 92, 231, 0.4) 50%, transparent 100%);
}

.logo {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 6px;
    margin-bottom: 4px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.3);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.87rem;
    font-weight: 400;
    margin-bottom: 36px;
    letter-spacing: 0.3px;
}

.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.form-group input {
    width: 100%;
    padding: 13px 16px;
    background: rgba(10, 12, 20, 0.6);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.93rem;
    font-weight: 400;
    outline: none;
    transition: all var(--transition-normal);
}
.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
    background: rgba(10, 12, 20, 0.8);
}
.form-group input::placeholder { color: var(--text-muted); }

/* ======= BUTTONS ======= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 50%);
    pointer-events: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 16px rgba(108, 92, 231, 0.3);
    width: 100%;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.12);
}
.btn-ghost::after { display: none; }

.btn-danger {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.15);
}
.btn-danger:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.3);
}
.btn-danger::after { display: none; }

.btn-sm { padding: 8px 16px; font-size: 0.8rem; font-weight: 500; border-radius: var(--radius-sm); }
.btn-xs { padding: 5px 12px; font-size: 0.75rem; border-radius: 6px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

.toggle-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
}
.toggle-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}
.toggle-text a:hover { color: #8577ed; }

.error-msg {
    margin-top: 20px;
    padding: 12px 16px;
    background: var(--danger-soft);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: var(--radius-md);
    color: var(--danger);
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    animation: slideDown 0.3s var(--ease-out);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ======= APP HEADER ======= */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    height: 64px;
    background: rgba(10, 12, 20, 0.85);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
}

.header-left { display: flex; align-items: center; gap: 24px; }
.app-header .logo { font-size: 1.15rem; letter-spacing: 5px; margin: 0; }

.header-nav { display: flex; gap: 4px; }
.header-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}
.header-nav a:hover, .header-nav a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.header-nav a.active { color: var(--accent); }

.header-right { display: flex; align-items: center; gap: 12px; }

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.15);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--success);
    transition: all var(--transition-normal);
}
.connection-status.disconnected {
    background: var(--danger-soft);
    border-color: rgba(255, 107, 107, 0.15);
    color: var(--danger);
}

.connection-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 8px var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}
.connection-status.disconnected .connection-dot {
    background: var(--danger);
    box-shadow: 0 0 8px var(--danger);
    animation: none;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}
.user-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
}

/* ======= STATS BAR ======= */
.stats-bar {
    display: flex;
    gap: 1px;
    padding: 0 28px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}
.stat-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-secondary);
}
.stat-item:first-child { border-radius: 0; }

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.stat-icon.purple { background: rgba(108, 92, 231, 0.12); color: var(--accent); }
.stat-icon.green { background: var(--success-soft); color: var(--success); }
.stat-icon.orange { background: var(--warning-soft); color: var(--warning); }
.stat-icon.red { background: var(--danger-soft); color: var(--danger); }
.stat-icon.blue { background: var(--info-soft); color: var(--info); }

.stat-content { min-width: 0; }
.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    line-height: 1.2;
}
.stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ======= MAIN LAYOUT ======= */
.main-layout {
    display: grid;
    grid-template-columns: 260px 1fr 400px;
    gap: 0;
    min-height: calc(100vh - 64px - 73px);
}

/* ======= SIDEBAR ======= */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 20px;
    overflow-y: auto;
}

.sidebar-section { margin-bottom: 28px; }
.sidebar-title {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding-left: 2px;
}

.filter-group { margin-bottom: 18px; }
.filter-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 7px;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    outline: none;
    transition: all var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
}
.filter-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a819a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.filter-select:focus, .filter-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}
.filter-select option { background: var(--bg-card); }

/* Range slider */
.range-wrapper { position: relative; padding-top: 4px; }
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: var(--bg-surface);
    border-radius: 2px;
    outline: none;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: var(--accent-gradient);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(108, 92, 231, 0.4);
    border: 2px solid var(--bg-secondary);
    transition: transform var(--transition-fast);
}
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.15); }

.range-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    padding: 3px 8px;
    background: var(--accent);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    color: #fff;
    margin-left: 10px;
}

.input-row { display: flex; gap: 8px; }
.input-row .filter-input { width: 50%; }

/* ======= MATCH LIST ======= */
.match-list-area {
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-count {
    font-size: 0.75rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-tertiary);
    padding: 3px 10px;
    background: var(--bg-elevated);
    border-radius: var(--radius-full);
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--danger);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.live-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--danger);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

.match-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
}

/* ======= MATCH CARD — PREMIUM ======= */
.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}
.match-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: transparent;
    transition: background var(--transition-normal);
}
.match-card:hover {
    border-color: var(--border-strong);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.match-card:hover::before {
    background: var(--accent-gradient);
}
.match-card.selected {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}
.match-card.selected::before {
    background: var(--accent-gradient);
}

.match-card.alarm {
    border-color: rgba(255, 107, 107, 0.25);
    animation: alarm-glow 2.5s ease-in-out infinite;
}
.match-card.alarm::before {
    background: var(--accent-gradient-danger);
}

/* TUTTU rozeti (alarm_fulfilled) */
.match-card.fulfilled {
    border-color: rgba(34, 197, 94, 0.45);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), rgba(255,255,255,0.02));
}
.match-card.fulfilled::before {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; font-size: 0.65rem; font-weight: 700;
    letter-spacing: 0.4px; border-radius: 6px;
}
.status-badge.tuttu {
    background: rgba(34, 197, 94, 0.18);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.45);
}
.status-badge.alarm {
    background: rgba(255, 107, 107, 0.18);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.5);
    animation: status-pulse 1.6s ease-in-out infinite;
}
.status-badge.new-alarm {
    background: rgba(245, 158, 11, 0.18);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.5);
    animation: status-pulse 2s ease-in-out infinite;
}
@keyframes status-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.75; transform: scale(0.96); }
}
.fulfillment-strip {
    margin: 8px 0;
    padding: 6px 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.35);
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #22c55e;
    letter-spacing: 0.3px;
}
/* Baskın taraf noktası */
.dom-dot {
    color: #facc15;
    font-size: 0.85em;
    margin-left: 2px;
    cursor: help;
    text-shadow: 0 0 4px rgba(250, 204, 21, 0.6);
}

@keyframes alarm-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.1); }
    50% { box-shadow: 0 0 32px 4px rgba(255, 107, 107, 0.08); }
}

.card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.sport-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.sport-badge.football {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 184, 148, 0.15);
}
.sport-badge.basketball {
    background: rgba(253, 203, 110, 0.1);
    color: var(--warning);
    border: 1px solid rgba(253, 203, 110, 0.15);
}

.sport-badge svg { width: 12px; height: 12px; }

.league-tag {
    font-size: 0.73rem;
    font-weight: 500;
    color: var(--text-tertiary);
}

.card-match {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.team {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.team:last-child { text-align: right; }
.team-name {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.team-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

.score-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.score-display {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
    letter-spacing: 2px;
    line-height: 1;
    padding: 6px 16px;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    white-space: nowrap;
}

.match-minute {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}
.match-minute.live { color: var(--success); }
.match-minute.live .live-dot-sm {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* Signal gauge */
.signal-gauge {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.gauge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.gauge-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.gauge-value {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
}

.gauge-track {
    width: 100%;
    height: 4px;
    background: var(--bg-surface);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.gauge-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.6s var(--ease-out), background 0.3s;
    position: relative;
}
.gauge-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: -2px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: inherit;
    box-shadow: 0 0 8px currentColor;
}

/* Rule tags */
.rule-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}
.rule-tag {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.12);
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.mute-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.mute-btn svg { width: 12px; height: 12px; }
.mute-btn:hover { border-color: var(--warning); color: var(--warning); }
.mute-btn.muted {
    background: var(--danger-soft);
    border-color: rgba(255, 107, 107, 0.2);
    color: var(--danger);
}

.ml-badge {
    font-size: 0.68rem;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(116, 185, 255, 0.1);
    border: 1px solid rgba(116, 185, 255, 0.15);
    color: var(--info);
}

/* ======= DETAIL PANEL ======= */
.detail-panel {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    padding: 24px 20px;
    overflow-y: auto;
}

.panel-section { margin-bottom: 28px; }
.panel-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.panel-title svg { width: 14px; height: 14px; color: var(--text-tertiary); }

.chart-container {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    position: relative;
}

/* Selected match info */
.selected-match-info {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.smi-teams {
    font-size: 0.9rem;
    font-weight: 600;
}
.smi-score {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

/* ======= ALARM TABLE — PREMIUM ======= */
.alarm-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
    font-size: 0.8rem;
}
.alarm-table thead th {
    text-align: left;
    padding: 8px 12px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    border: none;
}
.alarm-table tbody tr {
    background: var(--bg-elevated);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.alarm-table tbody tr:hover { background: var(--bg-card-hover); }
.alarm-table td {
    padding: 10px 12px;
    border: none;
    white-space: nowrap;
}
.alarm-table td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.alarm-table td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.75rem;
    font-family: 'JetBrains Mono', monospace;
}
.score-pill.critical {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(238, 90, 36, 0.15));
    color: var(--danger);
    border: 1px solid rgba(255, 107, 107, 0.2);
}
.score-pill.high {
    background: var(--warning-soft);
    color: var(--warning);
    border: 1px solid rgba(253, 203, 110, 0.15);
}
.score-pill.medium {
    background: var(--info-soft);
    color: var(--info);
    border: 1px solid rgba(116, 185, 255, 0.15);
}
.score-pill.low {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid rgba(0, 184, 148, 0.15);
}

.alarm-rules {
    font-size: 0.68rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-tertiary);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ======= SETTINGS PAGE ======= */
.settings-layout {
    max-width: 800px;
    margin: 0 auto;
    padding: 32px 28px;
}

.settings-header {
    margin-bottom: 32px;
}
.settings-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.settings-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    transition: border-color var(--transition-fast);
}
.settings-card:hover { border-color: var(--border-strong); }

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.settings-card-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.settings-card-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    transition: all var(--transition-fast);
}
.config-item:hover { border-color: var(--border-strong); }

.config-item-info { display: flex; align-items: center; gap: 10px; }
.config-item-label { font-size: 0.85rem; font-weight: 500; }
.config-item-sub { font-size: 0.75rem; color: var(--text-tertiary); }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Toggle switch */
.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    cursor: pointer;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
    position: absolute;
    inset: 0;
    background: var(--bg-surface);
    border-radius: 11px;
    border: 1px solid var(--border-strong);
    transition: all var(--transition-normal);
}
.toggle-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: all var(--transition-normal);
}
.toggle input:checked ~ .toggle-track {
    background: rgba(108, 92, 231, 0.2);
    border-color: var(--accent);
}
.toggle input:checked ~ .toggle-thumb {
    transform: translateX(18px);
    background: var(--accent);
}

/* ======= NO DATA ======= */
.no-data {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.no-data-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    opacity: 0.3;
}
.no-data-text { color: var(--text-tertiary); }

/* ======= LOADING SKELETON ======= */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ======= TOAST ======= */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    animation: toastIn 0.4s var(--ease-out);
    max-width: 380px;
}
.toast.alarm-toast { border-left: 3px solid var(--danger); }
.toast.success-toast { border-left: 3px solid var(--success); }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

/* ======= GOAL CARD EFFECT ======= */
.goal-flash {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 10px;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.15) 0%, rgba(0, 206, 201, 0.1) 100%);
    border: 1px solid rgba(0, 184, 148, 0.3);
    border-radius: var(--radius-sm);
    animation: goalFlashIn 0.4s var(--ease-out);
}
.goal-icon {
    font-size: 1.4rem;
    animation: goalBounce 0.5s ease;
}
.goal-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--success);
    letter-spacing: 1px;
}
.match-card.goal-highlight {
    border-color: var(--success) !important;
    box-shadow: 0 0 24px rgba(0, 184, 148, 0.2), 0 0 48px rgba(0, 184, 148, 0.08) !important;
}
@keyframes goalFlashIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes goalFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(8px); }
}
@keyframes goalBounce {
    0% { transform: scale(0.3) rotate(-20deg); }
    50% { transform: scale(1.3) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* ======= RESPONSIVE ======= */
@media (max-width: 1280px) {
    .main-layout { grid-template-columns: 240px 1fr 360px; }
}
@media (max-width: 1024px) {
    .main-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .detail-panel { display: none; }
    .stats-bar { overflow-x: auto; }
}
@media (max-width: 768px) {
    .match-grid { grid-template-columns: 1fr; }
    .app-header { padding: 0 16px; }
    .match-list-area { padding: 16px; }
    .stats-bar { gap: 0; }
    .stat-item { padding: 12px; }
    .stat-value { font-size: 1.1rem; }
}
