/* ========================================
   Dashboard - Casino Luxury Theme
   ======================================== */

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

.dash-page {
    font-family: 'DM Sans', sans-serif;
    background: #05050a;
    color: #e8e6f0;
    min-height: 100vh;
}

.dash-page .navbar {
    background: rgba(5, 5, 10, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
    height: 64px;
    padding: 0 40px;
}

.dash-page .navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #f5c542, #d4a017, #b8860b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========== Layout ========== */

.dash-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(212, 160, 23, 0.12);
}

.dash-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dash-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    box-shadow: 0 0 24px rgba(124, 58, 237, 0.3);
    flex-shrink: 0;
}

.dash-header-info h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.dash-header-info h1 span {
    background: linear-gradient(135deg, #f5c542, #d4a017);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dash-header-info p {
    font-size: 0.85rem;
    color: #9896a6;
}

.dash-header-right {
    display: flex;
    gap: 12px;
}

.dash-header-right .btn-live-preview {
    background: rgba(255, 45, 85, 0.12);
    border: 1px solid rgba(255, 45, 85, 0.3);
    color: #ff2d55;
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.dash-header-right .btn-live-preview:hover {
    background: rgba(255, 45, 85, 0.2);
    color: #ff2d55;
}

/* ========== Stats Row ========== */

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.dash-stat {
    background: #0d0d14;
    border: 1px solid #1e1e2e;
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.2s;
}

.dash-stat:hover {
    border-color: rgba(212, 160, 23, 0.3);
    transform: translateY(-2px);
}

.dash-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity 0.3s;
}

.dash-stat:hover::before {
    opacity: 1;
}

.dash-stat:nth-child(1)::before { background: linear-gradient(90deg, transparent, #d4a017, transparent); }
.dash-stat:nth-child(2)::before { background: linear-gradient(90deg, transparent, #7c3aed, transparent); }
.dash-stat:nth-child(3)::before { background: linear-gradient(90deg, transparent, #ff2d55, transparent); }
.dash-stat:nth-child(4)::before { background: linear-gradient(90deg, transparent, #00e676, transparent); }

.dash-stat-value {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.dash-stat:nth-child(1) .dash-stat-value { color: #f5c542; }
.dash-stat:nth-child(2) .dash-stat-value { color: #a855f7; }
.dash-stat:nth-child(3) .dash-stat-value { color: #ff2d55; }
.dash-stat:nth-child(4) .dash-stat-value { color: #00e676; }

.dash-stat-label {
    font-size: 0.78rem;
    color: #9896a6;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ========== Grid Layout ========== */

.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dash-grid .full-width {
    grid-column: 1 / -1;
}

/* ========== Cards ========== */

.dash-card {
    background: #0d0d14;
    border: 1px solid #1e1e2e;
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.dash-card:hover {
    border-color: rgba(212, 160, 23, 0.2);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #1e1e2e;
}

.dash-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
}

.dash-card-title .icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.icon--gold { background: rgba(212, 160, 23, 0.15); border: 1px solid rgba(212, 160, 23, 0.25); }
.icon--purple { background: rgba(124, 58, 237, 0.15); border: 1px solid rgba(124, 58, 237, 0.25); }
.icon--red { background: rgba(255, 45, 85, 0.15); border: 1px solid rgba(255, 45, 85, 0.25); }
.icon--green { background: rgba(0, 230, 118, 0.15); border: 1px solid rgba(0, 230, 118, 0.25); }

.dash-card-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge--gold { background: rgba(212, 160, 23, 0.12); color: #f5c542; }
.badge--purple { background: rgba(124, 58, 237, 0.12); color: #a855f7; }

.dash-card-body {
    padding: 24px;
}

/* ========== Stream Key ========== */

.key-container {
    background: #12121c;
    border: 1px solid #1e1e2e;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.key-container input {
    flex: 1;
    background: none;
    border: none;
    color: #e8e6f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    outline: none;
    letter-spacing: 0.02em;
}

.key-actions {
    display: flex;
    gap: 8px;
}

.key-actions .btn-key {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-key--show {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #a855f7;
}

.btn-key--show:hover {
    background: rgba(124, 58, 237, 0.2);
}

.btn-key--copy {
    background: rgba(212, 160, 23, 0.12);
    border: 1px solid rgba(212, 160, 23, 0.3);
    color: #f5c542;
}

.btn-key--copy:hover {
    background: rgba(212, 160, 23, 0.2);
}

.btn-key--regen {
    background: rgba(255, 45, 85, 0.1);
    border: 1px solid rgba(255, 45, 85, 0.25);
    color: #ff6b8a;
}

.btn-key--regen:hover {
    background: rgba(255, 45, 85, 0.2);
}

/* ========== OBS Steps ========== */

.obs-steps {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.obs-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #12121c;
    border-radius: 10px;
    border: 1px solid #1e1e2e;
    transition: border-color 0.2s;
}

.obs-step:hover {
    border-color: rgba(212, 160, 23, 0.2);
}

.obs-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.2), rgba(212, 160, 23, 0.05));
    border: 1px solid rgba(212, 160, 23, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #f5c542;
    flex-shrink: 0;
}

.obs-step-text {
    font-size: 0.85rem;
    color: #adadb8;
    line-height: 1.5;
}

.obs-step-text code {
    background: rgba(124, 58, 237, 0.12);
    color: #bf94ff;
    padding: 2px 8px;
    border-radius: 5px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    border: 1px solid rgba(124, 58, 237, 0.15);
}

/* ========== Stream Config Form ========== */

.stream-form-v2 .form-row {
    margin-bottom: 16px;
}

.stream-form-v2 label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #9896a6;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.stream-form-v2 input,
.stream-form-v2 textarea {
    width: 100%;
    background: #12121c;
    border: 1px solid #1e1e2e;
    border-radius: 10px;
    padding: 14px 16px;
    color: #e8e6f0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stream-form-v2 input:focus,
.stream-form-v2 textarea:focus {
    border-color: rgba(212, 160, 23, 0.4);
    box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.08);
}

.stream-form-v2 input::placeholder,
.stream-form-v2 textarea::placeholder {
    color: #555;
}

.stream-form-v2 .btn-save {
    background: linear-gradient(135deg, #d4a017, #f5c542);
    color: #0a0a0f;
    padding: 12px 32px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stream-form-v2 .btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 160, 23, 0.3);
}

.stream-form-status {
    margin-top: 12px;
    font-size: 0.85rem;
    min-height: 20px;
}

/* ========== Channel Link ========== */

.channel-link-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #12121c;
    border: 1px solid #1e1e2e;
    border-radius: 10px;
    padding: 14px 16px;
}

.channel-link-box a {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #a855f7;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-link-box a:hover {
    color: #bf94ff;
}

.btn-copy-link {
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.3);
    color: #a855f7;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-copy-link:hover {
    background: rgba(124, 58, 237, 0.2);
}

/* ========== Subscriber List V2 ========== */

.sub-list-v2 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.sub-row:hover {
    background: #12121c;
}

.sub-row-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.sub-row-info {
    flex: 1;
    min-width: 0;
}

.sub-row-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: block;
}

.sub-row-meta {
    font-size: 0.75rem;
    color: #9896a6;
    margin-top: 1px;
}

.sub-row-live {
    background: #ff2d55;
    color: white;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    box-shadow: 0 0 10px rgba(255, 45, 85, 0.3);
    animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
    0%, 100% { box-shadow: 0 0 10px rgba(255, 45, 85, 0.3); }
    50% { box-shadow: 0 0 18px rgba(255, 45, 85, 0.5); }
}

.sub-empty {
    padding: 32px;
    text-align: center;
    color: #555;
    font-size: 0.85rem;
}

/* ========== Live Status Indicator ========== */

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
}

.live-indicator--offline {
    background: rgba(132, 132, 148, 0.1);
    color: #848494;
    border: 1px solid rgba(132, 132, 148, 0.2);
}

.live-indicator--online {
    background: rgba(255, 45, 85, 0.12);
    color: #ff2d55;
    border: 1px solid rgba(255, 45, 85, 0.3);
}

.live-indicator--online::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #ff2d55;
    border-radius: 50%;
    animation: blink-dot 1.5s ease-in-out infinite;
}

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

/* ========== Responsive ========== */

@media (max-width: 768px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .dash-stat-value {
        font-size: 1.6rem;
    }

    .key-container {
        flex-direction: column;
        align-items: stretch;
    }

    .key-actions {
        flex-wrap: wrap;
    }
}
