/* ═══════════════════════════════════════════════════
   FÖRBIR OSINT Command Panel — Design System
   ═══════════════════════════════════════════════════ */

:root {
    --bg-void: #050508;
    --bg-base: #0a0a0f;
    --bg-panel: #0d0d14;
    --bg-elevated: #111118;
    --bg-hover: #16161f;

    --border-dim: #1a1a28;
    --border-mid: #252535;
    --border-glow: rgba(0, 230, 118, 0.25);

    --green: #00e676;
    --green-dim: #00a855;
    --green-glow: rgba(0, 230, 118, 0.15);
    --amber: #ffb000;
    --amber-dim: #cc8a00;
    --red: #ff3b5c;
    --cyan: #00d4ff;
    --cyan-dim: #0099bb;

    --text-primary: #e8e8f0;
    --text-secondary: #8888a0;
    --text-dim: #55556a;
    --text-mono: #b0ffb8;

    --font-ui: 'Inter', system-ui, sans-serif;
    --font-mono: 'Share Tech Mono', 'Consolas', monospace;

    --header-height: 64px;
    --sidebar-width: 260px;
    --radius: 4px;
    --transition: 0.15s ease;
}

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

html {
    font-size: 14px;
}

body {
    background: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-ui);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.mono {
    font-family: var(--font-mono);
}

/* ── Background Effects ── */
.panel-body {
    min-height: 100vh;
    overflow-x: hidden;
}

.grid-bg {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 230, 118, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 230, 118, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.scanlines {
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.08) 2px,
        rgba(0, 0, 0, 0.08) 4px
    );
    pointer-events: none;
    z-index: 9999;
    opacity: 0.4;
}

/* ── App Shell ── */
.app-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-body {
    display: flex;
    flex: 1;
    min-height: calc(100vh - var(--header-height));
}

/* ═══════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════ */
.osint-header {
    height: var(--header-height);
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.osint-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green-dim), transparent);
    opacity: 0.5;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.brand-icon {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-glow);
    background: var(--green-glow);
    color: var(--green);
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.brand-pulse {
    position: absolute;
    inset: -2px;
    border: 1px solid var(--green);
    opacity: 0;
    animation: brandPulse 3s ease infinite;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

@keyframes brandPulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.05); }
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-name {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 0.15em;
    line-height: 1;
}

.brand-sub {
    font-size: 0.6rem;
    color: var(--text-dim);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    line-height: 1;
}

.header-metrics {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    overflow: hidden;
    border: 1px solid var(--border-dim);
    background: var(--bg-base);
    border-radius: var(--radius);
}

.metric-cell {
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0.85rem;
    border-right: 1px solid var(--border-dim);
    min-width: 0;
}

.metric-cell:last-child {
    border-right: none;
}

.metric-label {
    font-size: 0.58rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    line-height: 1;
    margin-bottom: 3px;
}

.metric-value {
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.metric-value.mono {
    font-family: var(--font-mono);
    color: var(--text-mono);
}

.status-online {
    color: var(--green);
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-warn {
    color: var(--amber);
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-offline {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.kick-metric-cell {
    min-width: 88px;
}

.kick-status-link {
    text-decoration: none;
    transition: var(--transition);
}

.kick-status-link:hover {
    color: var(--green);
    text-decoration: none;
}

.kick-viewers {
    font-size: 0.58rem;
    color: var(--text-dim);
    line-height: 1;
    margin-top: 2px;
    display: block;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: blink 2s ease infinite;
    flex-shrink: 0;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.clock-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.clock-display {
    font-size: 1.1rem;
    color: var(--cyan);
    letter-spacing: 0.05em;
    line-height: 1;
}

.clock-date {
    font-size: 0.65rem;
    color: var(--text-dim);
    line-height: 1;
}

.header-logout {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--border-mid);
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: var(--transition);
    border-radius: var(--radius);
    background: var(--bg-elevated);
}

.header-logout:hover {
    border-color: var(--red);
    color: var(--red);
    background: rgba(255, 59, 92, 0.08);
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════ */
.osint-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-panel);
    border-right: 1px solid var(--border-dim);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-section {
    padding: 1rem 0 0.5rem;
}

.sidebar-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1rem 0.5rem;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    color: var(--text-dim);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-dim);
    margin-bottom: 0.25rem;
}

.sidebar-label-dot {
    width: 4px;
    height: 4px;
    background: var(--green);
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 0.25rem 0.5rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
    margin-bottom: 1px;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-dim);
    text-decoration: none;
}

.nav-item.active {
    background: var(--green-glow);
    border-color: var(--border-glow);
    color: var(--green);
}

.nav-icon {
    font-size: 0.7rem;
    opacity: 0.6;
    flex-shrink: 0;
}

.nav-item.active .nav-icon {
    opacity: 1;
    color: var(--green);
}

.nav-text {
    font-size: 0.82rem;
    flex: 1;
    white-space: nowrap;
}

.nav-tag {
    font-family: var(--font-mono);
    font-size: 0.58rem;
    color: var(--text-dim);
    letter-spacing: 0.05em;
    padding: 1px 4px;
    border: 1px solid var(--border-dim);
    border-radius: 2px;
    flex-shrink: 0;
}

.nav-item.active .nav-tag {
    color: var(--green-dim);
    border-color: var(--border-glow);
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid var(--border-dim);
}

.sidebar-status {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.sidebar-status-line {
    font-size: 0.65rem;
    color: var(--text-dim);
}

.status-online-text {
    color: var(--green);
}

/* ═══════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-width: 0;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-dim);
    gap: 1rem;
}

.page-code {
    font-size: 0.65rem;
    color: var(--green-dim);
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: 0.35rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
}

.session-badge {
    font-size: 0.65rem;
    color: var(--green);
    letter-spacing: 0.1em;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border-glow);
    background: var(--green-glow);
    border-radius: var(--radius);
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════
   PANELS & CARDS
   ═══════════════════════════════════════════════════ */
.osint-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    position: relative;
}

.osint-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--green);
    opacity: 0.6;
    border-radius: var(--radius) 0 0 var(--radius);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-dim);
    background: var(--bg-elevated);
}

.panel-title {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    font-weight: 600;
}

.panel-body-inner {
    padding: 1rem;
}

/* Stat Grid */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-tile {
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 1rem;
    position: relative;
    transition: var(--transition);
}

.stat-tile:hover {
    border-color: var(--border-glow);
    background: var(--bg-hover);
}

.stat-tile-label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.stat-tile-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    color: var(--cyan);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.stat-tile-value.green { color: var(--green); }
.stat-tile-value.amber { color: var(--amber); }
.stat-tile-value.red { color: var(--red); }
.stat-tile-value.cyan { color: var(--cyan); }

.stat-tile-desc {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.stat-tile-id {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 0.35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Info panel (legacy compat) */
.info-box {
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.info-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--cyan);
    opacity: 0.5;
    border-radius: var(--radius) 0 0 var(--radius);
}

.info-box h3 {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 0.75rem;
}

.info-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0.35rem 0;
}

.info-list {
    list-style: none;
}

.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.info-list li strong {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Legacy dashboard grid compat */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-glow);
}

.stat-card-header {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 0.5rem;
}

.stat-card-icon { display: none; }

.stat-card-value {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    color: var(--cyan);
    margin-bottom: 0.35rem;
}

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

.stat-card-trend {
    font-size: 0.7rem;
    margin-top: 0.35rem;
    font-family: var(--font-mono);
}

.trend-up { color: var(--green); }
.trend-down { color: var(--red); }

/* ═══════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════ */
.data-table-wrap {
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-elevated);
}

thead th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border-dim);
    font-weight: 600;
}

tbody tr {
    border-bottom: 1px solid var(--border-dim);
    transition: var(--transition);
}

tbody tr:last-child {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--bg-hover);
}

tbody td {
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    color: var(--text-primary);
    vertical-align: middle;
}

tbody td.mono-cell {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-mono);
}

/* ═══════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════ */
.btn, button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover, button:hover {
    border-color: var(--green-dim);
    color: var(--green);
    background: var(--green-glow);
    text-decoration: none;
}

.btn-primary {
    background: var(--green-glow);
    border-color: var(--border-glow);
    color: var(--green);
}

.btn-primary:hover {
    background: rgba(0, 230, 118, 0.2);
    border-color: var(--green);
}

.btn-danger {
    border-color: rgba(255, 59, 92, 0.4);
    color: var(--red);
}

.btn-danger:hover {
    background: rgba(255, 59, 92, 0.1);
    border-color: var(--red);
    color: #ff5252;
}

.btn-success:hover {
    background: rgba(0, 230, 118, 0.12);
    border-color: var(--green);
    color: var(--green);
}

.btn-warning {
    border-color: rgba(255, 176, 0, 0.4);
    color: var(--amber);
}

.btn-warning:hover {
    background: rgba(255, 176, 0, 0.1);
    border-color: var(--amber);
}

.btn-success {
    border-color: var(--border-glow);
    color: var(--green);
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.quick-btn:hover {
    border-color: var(--green-dim);
    color: var(--green);
    background: var(--green-glow);
    text-decoration: none;
}

.nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
}

.nav-back:hover {
    color: var(--green);
    border-color: var(--border-glow);
    text-decoration: none;
}

/* ═══════════════════════════════════════════════════
   ALERTS & BADGES
   ═══════════════════════════════════════════════════ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid;
    font-size: 0.85rem;
}

.alert-success {
    background: rgba(0, 230, 118, 0.08);
    border-color: rgba(0, 230, 118, 0.3);
    color: var(--green);
}

.alert-error {
    background: rgba(255, 59, 92, 0.08);
    border-color: rgba(255, 59, 92, 0.3);
    color: var(--red);
}

.alert-info {
    background: rgba(0, 212, 255, 0.08);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--cyan);
}

.alert-warning {
    background: rgba(255, 176, 0, 0.08);
    border-color: rgba(255, 176, 0, 0.3);
    color: var(--amber);
}

.notification-toast {
    position: fixed;
    top: calc(var(--header-height) + 12px);
    right: 16px;
    z-index: 10000;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    border: 1px solid;
}

.badge-success {
    color: var(--green);
    border-color: rgba(0, 230, 118, 0.3);
    background: var(--green-glow);
}

.badge-danger {
    color: var(--red);
    border-color: rgba(255, 59, 92, 0.3);
    background: rgba(255, 59, 92, 0.08);
}

.badge-warning {
    color: var(--amber);
    border-color: rgba(255, 176, 0, 0.3);
    background: rgba(255, 176, 0, 0.08);
}

.badge-info {
    color: var(--cyan);
    border-color: rgba(0, 212, 255, 0.3);
    background: rgba(0, 212, 255, 0.08);
}

/* ═══════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--bg-base);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    transition: var(--transition);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
        linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
    background-position: calc(100% - 16px) calc(50% - 2px), calc(100% - 11px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 2rem;
}

.form-group select option {
    background: var(--bg-panel);
    color: var(--text-primary);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green-dim);
    box-shadow: 0 0 0 2px var(--green-glow);
}

/* Progress */
.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--bg-base);
    border-radius: 2px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green-dim), var(--green));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ═══════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════ */
body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--bg-void);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-panel);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 1;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--green), transparent);
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    display: block;
    font-family: var(--font-mono);
    font-size: 2rem;
    color: var(--green);
    margin-bottom: 0.75rem;
}

.login-brand h1 {
    font-family: var(--font-mono);
    font-size: 1.4rem;
    color: var(--green);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.login-brand p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.login-error {
    background: rgba(255, 59, 92, 0.08);
    border: 1px solid rgba(255, 59, 92, 0.3);
    color: var(--red);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    text-align: center;
    font-family: var(--font-mono);
}

.login-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    font-weight: 600;
}

.login-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.login-form input:focus {
    outline: none;
    border-color: var(--green-dim);
    box-shadow: 0 0 0 2px var(--green-glow);
}

.login-form button {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid var(--border-glow);
    border-radius: var(--radius);
    background: var(--green-glow);
    color: var(--green);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition);
}

.login-form button:hover {
    background: rgba(0, 230, 118, 0.2);
    border-color: var(--green);
}

/* Game sections (oyunlar page) */
.game-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.game-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.game-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.05em;
}

/* Oyunlar page extras */
.cooldown-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.cooldown-table th,
.cooldown-table td { padding: 0.65rem 1rem; text-align: left; }
.cooldown-table thead { background: var(--bg-elevated); }
.cooldown-table thead th {
    color: var(--text-dim);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-dim);
}
.cooldown-table tbody tr { border-bottom: 1px solid var(--border-dim); }
.cooldown-table tbody tr:hover { background: var(--bg-hover); }
.cooldown-table td { color: var(--text-primary); font-size: 0.85rem; }

.action-btn {
    padding: 0.35rem 0.75rem;
    border: 1px solid;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
}
.action-btn-danger { border-color: rgba(255, 59, 92, 0.4); color: var(--red); }
.action-btn-danger:hover { background: rgba(255, 59, 92, 0.1); }
.action-btn-warning { border-color: rgba(255, 176, 0, 0.4); color: var(--amber); }
.action-btn-warning:hover { background: rgba(255, 176, 0, 0.1); }

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-family: var(--font-mono);
}

.yarisma-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.yarisma-stat {
    background: var(--bg-base);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 0.85rem;
}
.yarisma-stat-label {
    font-size: 0.62rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}
.yarisma-stat-value {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    color: var(--cyan);
}

.race-card {
    background: var(--bg-base);
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.race-guild { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; }
.race-meta { font-size: 0.8rem; color: var(--text-secondary); }
.info-chip {
    display: inline-flex;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    background: var(--bg-elevated);
    border-radius: var(--radius);
    padding: 0.2rem 0.5rem;
    border: 1px solid var(--border-dim);
}
.durum-aktif { color: var(--green); }
.durum-pasif { color: var(--text-dim); }
.user-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-cell-name {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-cell-id {
    font-size: 0.65rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}
.confirm-btn { display: inline; }
.confirm-btn button { all: unset; cursor: pointer; }
.badge-active { color: var(--green); border-color: rgba(0, 230, 118, 0.3); background: var(--green-glow); }
.badge-inactive { color: var(--text-dim); border-color: var(--border-dim); background: transparent; }
.badge-count { color: var(--cyan); border-color: rgba(0, 212, 255, 0.3); background: rgba(0, 212, 255, 0.08); }

/* ═══════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.loading {
    text-align: center;
    padding: 2rem;
    color: var(--cyan);
    font-family: var(--font-mono);
}

/* Legacy container (unused in new layout) */
.container {
    max-width: 1400px;
    margin: auto;
}

.panel-logout { display: none; }

h1, h2, h3 { color: var(--text-primary); }
h2 {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 1.5rem 0 0.75rem;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--green); }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .header-metrics .metric-cell:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 900px) {
    .app-body {
        flex-direction: column;
    }

    .osint-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-dim);
        overflow-x: auto;
    }

    .sidebar-section {
        padding: 0.5rem 0;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0.25rem 0.5rem;
    }

    .nav-item {
        padding: 0.4rem 0.6rem;
    }

    .nav-tag { display: none; }

    .sidebar-footer { display: none; }

    .header-metrics {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }
}

@media (max-width: 600px) {
    .osint-header {
        padding: 0 0.75rem;
        gap: 0.75rem;
    }

    .brand-sub { display: none; }

    .clock-date { display: none; }

    .page-header {
        flex-direction: column;
    }

    .stat-grid,
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    tr {
        margin-bottom: 0.75rem;
        border: 1px solid var(--border-dim);
        border-radius: var(--radius);
    }
    td {
        padding: 0.5rem 0.75rem;
        text-align: right;
        position: relative;
        border-bottom: 1px solid var(--border-dim);
    }
    td:last-child { border-bottom: none; }
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 0.75rem;
        font-size: 0.65rem;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--text-dim);
    }
}

/* ═══════════════════════════════════════════════════
   SUNUCU YÖNETİMİ (SRV)
   ═══════════════════════════════════════════════════ */
.protect-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.osint-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.osint-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.osint-switch-slider {
    position: absolute;
    inset: 0;
    background: #121212;
    border: 1px solid #242424;
    border-radius: 24px;
    transition: var(--transition);
}

.osint-switch-slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    top: 3px;
    background: #8888a0;
    border-radius: 50%;
    transition: var(--transition);
}

.osint-switch input:checked + .osint-switch-slider {
    background: rgba(0, 230, 118, 0.15);
    border-color: var(--green);
}

.osint-switch input:checked + .osint-switch-slider::before {
    transform: translateX(20px);
    background: var(--green);
}

.srv-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.srv-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-mid);
    background: #1a1a1a;
    flex-shrink: 0;
}

.srv-icon-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--green);
    background: #121212;
}

.srv-name {
    font-weight: 600;
    color: var(--text-primary);
}

.srv-owner {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 0.1rem;
}

.srv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.osint-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 8, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12000;
    padding: 1rem;
}

.osint-modal-backdrop[hidden] {
    display: none;
}

.osint-modal {
    width: min(460px, 100%);
    background: #1a1a1a;
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: 0 0 0 1px rgba(255, 82, 82, 0.15), 0 16px 48px rgba(0, 0, 0, 0.55);
}

.osint-modal-title {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    color: #ff5252;
    margin-bottom: 0.75rem;
}

.osint-modal-body {
    color: var(--text-secondary);
    font-size: 0.88rem;
    margin-bottom: 0.65rem;
}

.osint-modal-q {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════
   AUTOMOD
   ═══════════════════════════════════════════════════ */
.am-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.65rem;
}

.am-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--border-dim);
    border-radius: var(--radius);
    background: var(--bg-base);
}

.am-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.am-toggle-copy strong {
    font-size: 0.74rem;
    letter-spacing: 0.06em;
    color: var(--text-primary);
}

.am-toggle-copy span {
    font-size: 0.7rem;
    color: var(--text-dim);
    line-height: 1.35;
}

.am-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group select.multi {
    appearance: auto;
    background-image: none;
    min-height: 180px;
    padding-right: 0.5rem;
}

@media (max-width: 900px) {
    .am-split {
        grid-template-columns: 1fr;
    }
}
