/**
 * EXONIQ - Admin Panel CSS
 * Modern, Professional Dashboard Design
 */

:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --primary-light: #3385FF;
    --secondary: #00D4AA;
    --accent: #FF6B35;
    
    --dark: #0A0E27;
    --gray-900: #1A1D29;
    --gray-800: #2C3142;
    --gray-700: #3F4558;
    --gray-600: #5A6176;
    --gray-500: #767D94;
    --gray-400: #9EA5B8;
    --gray-300: #C5CAD5;
    --gray-200: #E5E8ED;
    --gray-100: #F5F7FA;
    
    --white: #FFFFFF;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    --sidebar-width: 280px;
    --header-height: 70px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
    background: linear-gradient(135deg, #F5F9FF 0%, #F0F7FF 100%);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================
   LOGIN PAGE
   ========================================== */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0A0E27 0%, #151B3D 50%, #1E2749 100%);
    position: relative;
    overflow: hidden;
}

.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 102, 255, 0.15), transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(0, 212, 170, 0.15), transparent 50%);
}

.login-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    margin-bottom: 1.5rem;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.logo-accent {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--gray-600);
    font-size: 1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9375rem;
}

.form-label i {
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.125rem;
    font-size: 1rem;
    color: var(--dark);
    background: var(--gray-100);
    border: 2px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 102, 255, 0.5);
}

.login-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-200);
}

.login-hint {
    background: rgba(0, 102, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    color: var(--gray-700);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.login-hint i {
    color: var(--primary);
}

.back-to-site {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-to-site:hover {
    color: var(--primary);
    transform: translateX(-4px);
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* ==========================================
   ADMIN LAYOUT
   ========================================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--dark) 0%, var(--gray-900) 100%);
    color: var(--white);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo .logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--white);
}

.admin-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 102, 255, 0.2);
    border: 1px solid rgba(0, 102, 255, 0.3);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-light);
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu-item {
    margin-bottom: 0.25rem;
}

.sidebar-menu-section {
    padding: 1rem 1.5rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    list-style: none;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 0 4px 4px 0;
    transition: height 0.3s ease;
}

.sidebar-menu-link:hover,
.sidebar-menu-link.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu-link.active::before,
.sidebar-menu-link:hover::before {
    height: 70%;
}

.sidebar-menu-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--white);
}

.admin-info h4 {
    font-size: 0.9375rem;
    margin-bottom: 0.125rem;
}

.admin-info p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

.btn-logout {
    width: 100%;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #FF6B6B;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.3);
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.admin-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.admin-header-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.admin-header-title p {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.admin-content {
    padding: 2rem;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success), #059669);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning), #D97706);
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--info), #2563EB);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9375rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Content Card */
.content-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: 2rem;
}

.content-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
}

.content-card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 1rem;
    font-weight: 700;
    color: var(--dark);
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.table tr:hover {
    background: rgba(0, 102, 255, 0.02);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 999px;
}

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

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-primary {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary);
}

/* Image Preview */
.image-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--gray-200);
}

/* Form Layouts */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

textarea.form-control {
    min-height: 200px;
    resize: vertical;
    font-family: inherit;
}

/* Editor */
.editor-toolbar {
    background: var(--gray-100);
    padding: 0.75rem;
    border-radius: 8px 8px 0 0;
    border: 1px solid var(--gray-200);
    border-bottom: none;
    display: flex;
    gap: 0.5rem;
}

.editor-btn {
    padding: 0.5rem 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .admin-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

