@charset "UTF-8";

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2"),
         url("../fonts/Vazirmatn-Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2"),
         url("../fonts/Vazirmatn-Medium.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2"),
         url("../fonts/Vazirmatn-Bold.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0f172a;
    --card: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --primary: #10b981;
    --danger: #ef4444;
    --border: #1f2937;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
}

input, select, textarea, button, table {
    font-family: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
}

a { color: var(--primary); text-decoration: none; }

.auth-body, .live-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(16,185,129,0.1), transparent 35%), var(--bg);
    padding: 24px;
}

.auth-container { width: 100%; max-width: 420px; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}

h1, h2 { margin: 0 0 16px; }

.form { display: flex; flex-direction: column; gap: 12px; }
.form input, .form select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0b1221;
    color: var(--text);
}
.form label { font-size: 14px; color: var(--muted); display: block; }
.form-actions { grid-column: 1 / -1; }

.btn {
    background: var(--primary);
    border: none;
    color: #04100b;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 10px 25px rgba(16,185,129,0.25);
}
.btn:hover { transform: translateY(-1px); }
.btn.danger { background: var(--danger); color: #fff; box-shadow: 0 10px 25px rgba(239,68,68,0.25); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); box-shadow: none; }
.btn.small { padding: 8px 12px; font-size: 13px; }

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}
.alert-danger { background: rgba(239,68,68,0.15); color: #fecaca; border: 1px solid rgba(239,68,68,0.3); }
.alert-success { background: rgba(16,185,129,0.15); color: #bbf7d0; border: 1px solid rgba(16,185,129,0.3); }

.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(17,24,39,0.8);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}
.top-actions { display: flex; gap: 10px; align-items: center; }

.container { padding: 24px; max-width: 1200px; margin: 0 auto; }
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.stat-card {
    background: linear-gradient(135deg, #0ea46b, #0a5e3d);
    padding: 16px;
    border-radius: 12px;
    color: #e8fff4;
    box-shadow: var(--shadow);
}
.stat-value { font-size: 28px; font-weight: 800; }
.stat-label { color: rgba(255,255,255,0.8); }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.table-responsive { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    color: var(--text);
}
table th, table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    text-align: right;
    white-space: nowrap;
}
table th a { color: var(--text); }
tr.row-today { color: #34d399; font-weight: 600; }

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
}
.status-dot.green { background: #10b981; }
.status-dot.dark { background: #111827; border: 1px solid #1f2937; }

.live-container {
    width: 100%;
    max-width: 960px;
    margin: 24px auto;
    padding: 0 16px;
}
.player-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}
#live-player { width: 100%; height: 60vh; border-radius: 12px; overflow: hidden; }
.quality-controls {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.quality-controls select {
    padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #0b1221;
    color: var(--text);
}

.tabs {
    display: flex;
    gap: 10px;
    margin: 12px 0;
}
.tab {
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    color: var(--text);
    background: #0b1221;
}
.tab.active {
    background: var(--primary);
    color: #04100b;
    border-color: var(--primary);
}
.snapshot-img {
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: block;
    margin-top: 12px;
    background: #0b1221;
}

@media (max-width: 640px) {
    .topbar { flex-direction: column; gap: 10px; align-items: flex-start; }
    #live-player { height: 45vh; }
}
