:root {
    --primary: #6C63FF;
    --primary-dark: #5A52E0;
    --secondary: #FF6584;
    --accent: #32D74B;
    --dark: #121212;
    --dark-light: #1E1E1E;
    --light: #FFFFFF;
    --gray: #AAAAAA;
    --gray-light: #F2F2F2;
    --gray-dark: #666666;
    --gradient: linear-gradient(135deg, #6C63FF, #3B36BF);
    --gradient-secondary: linear-gradient(135deg, #FF6584, #FF4D6D);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --card-radius: 12px;
    --btn-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
}

.btn {
    padding: 0.9rem 1.8rem;
    border-radius: var(--btn-radius);
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

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

.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 99, 255, 0.4);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--light);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Login Page Styles */
.admin-login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.95), rgba(18, 18, 18, 0.97));
    background-size: cover;
    background-position: center;
}

.admin-login-container {
    background: var(--dark-light);
    border-radius: var(--card-radius);
    max-width: 450px;
    width: 100%;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.admin-login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.admin-login-header h1 span {
    color: var(--primary);
}

.admin-login-header p {
    color: var(--gray);
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--light);
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.form-message {
    margin-bottom: 1rem;
    color: var(--secondary);
    min-height: 20px;
    font-size: 0.9rem;
}

.admin-login-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
}

/* Dashboard Styles */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--dark-light);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
}

.sidebar-header h1 {
    font-size: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-toggle {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.sidebar-toggle:hover {
    color: var(--light);
}

.sidebar-nav {
    margin-bottom: 2rem;
}

.sidebar-nav-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--gray);
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav-item {
    padding: 0.8rem 1.5rem;
    display: flex;
    align-items: center;
    color: var(--gray);
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.sidebar-nav-item:hover, .sidebar-nav-item.active {
    background: rgba(108, 99, 255, 0.1);
    color: var(--light);
}

.sidebar-nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
}

.sidebar-nav-icon {
    margin-right: 0.8rem;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
    color: var(--primary);
}

.sidebar-nav-text {
    white-space: nowrap;
    overflow: hidden;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    margin-left: 260px;
    transition: all 0.3s;
}

.admin-main.expanded {
    margin-left: 70px;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-user-menu {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 0.8rem;
}

.admin-user-info {
    margin-right: 0.5rem;
}

.admin-user-name {
    font-weight: 500;
}

.admin-user-role {
    font-size: 0.8rem;
    color: var(--gray);
}

.admin-dropdown-icon {
    font-size: 0.8rem;
    color: var(--gray);
}

.admin-card {
    background: var(--dark-light);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-card-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.admin-card-title i {
    margin-right: 0.5rem;
    color: var(--primary);
}

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

.admin-table th, .admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.admin-table th {
    font-weight: 500;
    color: var(--gray);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr {
    transition: background 0.3s;
}

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

.admin-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

.admin-badge.success {
    background: rgba(50, 215, 75, 0.15);
    color: var(--accent);
}

.admin-badge.warning {
    background: rgba(255, 159, 10, 0.15);
    color: #FF9F0A;
}

.admin-badge.danger {
    background: rgba(255, 69, 58, 0.15);
    color: #FF453A;
}

.admin-badge.info {
    background: rgba(0, 199, 190, 0.15);
    color: #00C7BE;
}

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

.admin-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--gray);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.admin-action-btn:hover {
    background: rgba(108, 99, 255, 0.2);
    color: var(--primary);
}

/* Content Management Styles */
.admin-content-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-filters {
    display: flex;
    gap: 1rem;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--gray);
    font-size: 0.9rem;
}

.filter-group select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--light);
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--light);
    padding: 0.5rem;
    font-size: 0.9rem;
    outline: none;
    width: 200px;
}

.search-box .search-btn {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0.5rem;
}

.admin-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    gap: 0.5rem;
}

.pagination-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--gray);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(108, 99, 255, 0.1);
    color: var(--primary);
}

.pagination-btn.active {
    background: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal Styles */
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.admin-modal.active {
    display: block;
}

.admin-modal-content {
    background: var(--dark-light);
    border-radius: var(--card-radius);
    margin: 2rem auto;
    max-width: 800px;
    width: 90%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-modal-close {
    background: transparent;
    border: none;
    color: var(--gray);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.admin-modal-close:hover {
    color: var(--light);
}

.admin-modal-body {
    padding: 1.5rem;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--light);
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.25);
}

.file-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.file-input-container input[type="file"] {
    display: none;
}

.file-input-container .file-select-btn {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.file-input-container .file-name {
    color: var(--gray);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.thumbnail-preview {
    margin-top: 0.5rem;
    width: 200px;
    height: 112px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .btn {
    width: auto;
}

/* Row Styles */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col {
    flex: 1;
    padding: 0 0.75rem;
    min-width: calc(25% - 1.5rem);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .col {
        min-width: calc(50% - 1.5rem);
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 70px;
    }
    
    .admin-sidebar.expanded {
        width: 260px;
    }
    
    .admin-main {
        margin-left: 70px;
    }
    
    .admin-main.shrunk {
        margin-left: 260px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .admin-content-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .admin-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .col {
        min-width: 100%;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .admin-login-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .admin-login-header h1 {
        font-size: 2rem;
    }
    
    .admin-modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .admin-modal-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .admin-table th, .admin-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
}