/* ========================================
   ADMIN PANEL STYLES - REIMAGINED
   ======================================== */

:root {
    --admin-bg: #f0f2f5;
    --admin-card-bg: rgba(255, 255, 255, 0.8);
    --admin-sidebar-bg: rgba(255, 255, 255, 0.9);
    --admin-primary: #14283c;
    --admin-primary-dark: #0a141e;
    --admin-accent: #f0b428;
    --admin-text: #1a1a2e;
    --admin-text-light: #6c757d;
    --admin-border: rgba(0, 0, 0, 0.08);
    --admin-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --admin-glass-border: rgba(255, 255, 255, 0.18);
}

/* Login Page Styles */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top left, #14283c, #1a1a2e);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
}

.login-background {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    /* Increased opacity slightly but removed blur */
    animation: float 20s infinite ease-in-out;
}

.bg-shape.shape-1 {
    width: 500px;
    height: 500px;
    top: -150px;
    left: -150px;
}

.bg-shape.shape-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.bg-shape.shape-3 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(50px, -50px) scale(1.05) rotate(10deg);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.95) rotate(-5deg);
    }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.login-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 3rem;
    transition: transform 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    height: 70px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.login-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--admin-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--admin-text-light);
    font-size: 0.9rem;
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 0.5rem;
}

.form-field input[type="text"],
.form-field input[type="password"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    background: white;
    transition: all 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 4px rgba(20, 40, 60, 0.1);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--admin-primary-dark);
    transform: scale(1.02);
}

.btn-secondary {
    background: #f0f2f5;
    color: var(--admin-text);
}

.btn-secondary:hover {
    background: #e4e6e9;
}

.btn-block {
    width: 100%;
}

/* Dashboard Layout */
.admin-dashboard {
    min-height: 100vh;
    background: var(--admin-bg);
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    color: var(--admin-text);
}

.admin-navbar {
    background: var(--admin-sidebar-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--admin-border);
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-brand img {
    height: 36px;
}

.admin-brand h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.admin-nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 100px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--admin-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-main {
    flex: 1;
    display: flex;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: var(--admin-sidebar-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--admin-glass-shadow);
    height: fit-content;
    position: sticky;
    top: 5.5rem;
    border: 1px solid var(--admin-glass-border);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--admin-text-light);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.page-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-item {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--admin-text-light);
    font-weight: 500;
}

.page-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--admin-text);
}

.page-item.active {
    background: var(--admin-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(20, 40, 60, 0.2);
}

/* Content Area */
.admin-content {
    flex: 1;
    background: var(--admin-card-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--admin-glass-shadow);
    border: 1px solid var(--admin-glass-border);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
}

.content-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.content-actions {
    display: flex;
    gap: 0.75rem;
}

/* Section Cards */
.sections-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.section-card {
    background: white;
    border: 1px solid var(--admin-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--admin-primary);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.section-card:hover {
    border-color: rgba(20, 40, 60, 0.3);
    box-shadow: 0 10px 25px -10px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.section-card:hover::before {
    opacity: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    background: #f0f2f5;
    color: var(--admin-text-light);
}

.section-title-input {
    font-size: 1.25rem;
    font-weight: 700;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    margin-bottom: 0.5rem;
}

.section-title-input:focus {
    box-shadow: none !important;
}

.section-field {
    margin-bottom: 1.25rem;
}

.section-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--admin-text-light);
    margin-bottom: 0.5rem;
}

.section-field textarea {
    min-height: 80px;
    line-height: 1.5;
}

/* Image Upload Area */
.image-upload-area {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}

.image-upload-area:hover {
    border-color: var(--admin-primary);
    background: rgba(20, 40, 60, 0.02);
}

.image-upload-area.has-image {
    padding: 0;
    border: none;
    overflow: hidden;
}

.image-preview {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
}

.upload-placeholder {
    color: var(--admin-text-light);
}

.upload-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Add Section Button Bottom */
.add-section-btn {
    width: 100%;
    padding: 1.5rem;
    border: 2px dashed rgba(0, 0, 0, 0.08);
    background: transparent;
    color: var(--admin-text-light);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.add-section-btn:hover {
    border-color: var(--admin-primary);
    color: var(--admin-primary);
    background: rgba(20, 40, 60, 0.02);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid rgba(30, 126, 52, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal */
.modal {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Responsive */
@media (max-width: 1200px) {
    .admin-main {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        position: static;
    }
}

@media (max-width: 768px) {
    .admin-navbar {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .admin-content {
        padding: 1.5rem;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .login-card {
        padding: 2rem;
    }
}