/* WORKSPACE365 Enterprise Admin Dashboard Styling */

:root {
    --bg-dark: #080d1a;
    --bg-card: rgba(19, 29, 51, 0.75);
    --bg-card-hover: rgba(25, 38, 66, 0.9);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(0, 240, 255, 0.4);
    --accent-color: #00f0ff;
    --accent-secondary: #7000ff;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --sidebar-width: 260px;
}

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

body.admin-body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: #0d1527;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav {
    padding: 1.25rem 0.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.nav-item:hover, .nav-item.active {
    color: var(--text-primary);
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.2);
}

.nav-item.active {
    color: var(--accent-color);
    background: rgba(0, 240, 255, 0.12);
}

/* Main Content Area */
.admin-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, rgba(0, 240, 255, 0.04), transparent 40%),
                radial-gradient(circle at bottom left, rgba(112, 0, 255, 0.04), transparent 40%);
}

.admin-header {
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(13, 21, 39, 0.8);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
}

.admin-content {
    padding: 2rem;
    flex: 1;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.06);
}

.metric-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.metric-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

/* Section Cards & Tables */
.admin-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-card-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

/* Data Table */
.data-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.admin-table th {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.85rem 1rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    vertical-align: middle;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-published { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-draft { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-active { background: rgba(0, 240, 255, 0.15); color: #00f0ff; border: 1px solid rgba(0, 240, 255, 0.3); }
.badge-unsub { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

/* Buttons & Inputs */
.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-admin-primary {
    background: linear-gradient(135deg, var(--accent-color), #0077ff);
    color: #000;
}

.btn-admin-primary:hover {
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
    transform: translateY(-1px);
}

.btn-admin-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    color: #fff;
}

.btn-admin-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-admin-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-admin-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.admin-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: #fff;
    font-size: 0.88rem;
    outline: none;
    transition: all 0.2s ease;
}

.admin-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.15);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-card {
    background: #0f172a;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    width: 100%;
    max-width: 750px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

/* Upload Dropzone */
.dropzone {
    border: 2px dashed rgba(0, 240, 255, 0.3);
    border-radius: 14px;
    padding: 3rem 2rem;
    text-align: center;
    background: rgba(0, 240, 255, 0.02);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--accent-color);
    background: rgba(0, 240, 255, 0.06);
}

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

.toast {
    background: #1e293b;
    border-left: 4px solid var(--accent-color);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

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

@media (max-width: 900px) {
    .admin-sidebar { width: 70px; }
    .admin-sidebar .sidebar-text, .admin-sidebar .sidebar-header { display: none; }
    .admin-main { margin-left: 70px; }
}
