/* Admin Area Specific Styling */

/* Admin View Shell */
#admin-view {
    display: none; /* Controlled by active class */
    flex-direction: row;
    width: 100%;
}

#admin-view.active {
    display: flex;
}

/* Sidebar styling */
.admin-sidebar {
    width: 260px;
    background: rgba(19, 17, 39, 0.4);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    transition: all var(--transition-fast);
}

.nav-item:hover {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.04);
}

.nav-item.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-left: 3px solid var(--primary);
    box-shadow: inset 2px 0 8px rgba(139, 92, 246, 0.1);
}

.nav-item i {
    width: 20px;
    height: 20px;
}

/* Main Body administrative sections */
.admin-body {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: linear-gradient(135deg, #0a0813 0%, #110e25 100%);
}

.tab-content {
    display: none;
    animation: fadeIn var(--transition-fast) forwards;
}

.tab-content.active {
    display: block;
}

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

/* Dashboard Home */
.dashboard-welcome {
    margin-bottom: 32px;
}

.dashboard-welcome h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    color: var(--color-text-muted);
}

/* Stats Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow-premium);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    width: 28px;
    height: 28px;
    color: #fff;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.stat-info h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-info p {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Details Layout */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dashboard-col h3 {
    font-family: var(--font-heading);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2rem;
}

.quick-actions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-quick-nav {
    flex: 1 1 140px;
}

.config-preview-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.preview-item .label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.preview-item .value {
    font-weight: 600;
}

/* Form Styling */
.premium-form {
    max-width: 650px;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-wrapper input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    background: none;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: 2px solid var(--border-color);
    border-radius: 50%;
}

.color-hex-label {
    font-family: monospace;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
}

/* PWA status */
.pwa-status-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(139, 92, 246, 0.05);
    border: 1px dashed var(--primary);
    padding: 16px;
    border-radius: var(--radius-sm);
    gap: 16px;
}

.pwa-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pwa-info i {
    color: var(--primary);
    width: 32px;
    height: 32px;
}

.pwa-info p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Tab Headers */
.section-header {
    margin-bottom: 24px;
}

.section-header.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 6px;
}

.section-header p {
    color: var(--color-text-muted);
}

/* Premium Tables */
.table-container {
    overflow-x: auto;
    padding: 0;
}

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

.premium-table th, 
.premium-table td {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.premium-table th {
    background: rgba(255, 255, 255, 0.02);
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.premium-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

.table-cover-img {
    width: 64px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Visibility tags */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-visible {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-hidden {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Action button icons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-action:hover {
    color: #fff;
    background: var(--bg-surface-hover);
}

.btn-action.edit:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-action.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-action.key:hover {
    border-color: var(--warning);
    color: var(--warning);
}

/* Extra Inline number input */
.inline-number {
    width: 50px;
    padding: 4px !important;
    text-align: center;
    margin: 0 4px;
    border-radius: 4px !important;
}

/* Modal video choice tabs */
.video-type-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
}

.tab-choice {
    flex: 1;
    text-align: center;
    padding: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.tab-choice input {
    display: none;
}

.tab-choice.active {
    background: var(--primary);
    color: #fff;
}

/* File Upload simulators */
.file-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: border-color var(--transition-fast);
    position: relative;
}

.file-drop-area:hover {
    border-color: var(--primary);
}

.file-drop-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-drop-area i {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.file-info-text {
    font-size: 0.8rem;
    color: var(--success);
    margin-top: 4px;
}

.input-action-group {
    display: flex;
    gap: 8px;
}

.input-action-group input {
    flex: 1;
}

.preset-covers {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.border-top {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
}

/* Release rules styling */
.release-rules {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.radio-label input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}
