/**
 * Lucky Draw System V3 - Admin Panel CSS
 */

.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.admin-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.admin-brand {
    padding: 1.5rem 1.25rem;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

.brand-icon {
    font-size: 1.4rem;
}

.admin-nav {
    list-style: none;
    padding: 1rem 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-nav-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.admin-nav-item a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.admin-nav-item.active a {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.nav-icon {
    font-size: 1.15rem;
    width: 20px;
    text-align: center;
}

.admin-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    font-size: 0.875rem;
}
.user-name {
    font-weight: 600;
    color: #ffffff;
}
.user-role {
    color: var(--text-dim);
    font-size: 0.75rem;
}

/* Main Content Area */
.admin-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    min-width: 0;
}

.admin-topbar {
    height: 65px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
}

.admin-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.admin-content {
    padding: 1.75rem;
    flex-grow: 1;
    overflow-y: auto;
}

/* Dashboard Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(67, 97, 238, 0.15);
    color: var(--primary);
}

.stat-val {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.stat-lbl {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Event Sub-Navigation Tabs */
.event-header {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.event-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.event-nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    overflow-x: auto;
}

.event-tab-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.event-tab-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.event-tab-link.active {
    background: var(--bg-surface);
    color: #ffffff;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

/* Data Tables */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.table-header-bar {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.table-responsive {
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.data-table th {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.85rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

table.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.925rem;
    color: #e2e8f0;
}

table.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Live Draw Console Stage */
.draw-console-container {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.5rem;
}

.draw-control-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.draw-stage-panel {
    background: radial-gradient(circle at center, #1a233a, #0b1120);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

.draw-action-banner {
    margin-top: 1.5rem;
    width: 100%;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

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

/* QR Code Display Card */
.qr-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.qr-box {
    display: inline-block;
    padding: 1rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    margin: 1.25rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

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