* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1f2937;
    overflow-x: hidden;
    min-height: 100vh;
}

.admin-container {
    display: flex;
    min-height: 100vh;
    background: #f9fafb;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

    .sidebar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
        animation: shimmer 3s ease-in-out infinite;
    }

@keyframes shimmer {
    0%, 100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.logo {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

    .logo h2 {
        font-size: 1.5rem;
        font-weight: 700;
        background: linear-gradient(135deg, #3b82f6, #8b5cf6);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.nav-menu {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.5rem 1rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
    color: #6b7280;
    font-weight: 500;
    text-decoration: none;
}

    .nav-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
        transition: left 0.5s ease;
        z-index: 1;
    }

    .nav-item:hover::before {
        left: 100%;
    }

    .nav-item:hover {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
        transform: translateX(8px);
        border-left: 3px solid #3b82f6;
        color: #1f2937;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.1);
    }

    .nav-item.active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
        border-left: 3px solid #3b82f6;
        color: #1f2937;
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
    }

.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: #f9fafb;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    text-decoration: none;
}

    .back-btn:hover {
        background: #f9fafb;
        transform: translateY(-2px);
        color: #374151;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1f2937, #374151);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

    .breadcrumb a {
        color: #3b82f6;
        text-decoration: none;
        transition: color 0.2s ease;
    }

        .breadcrumb a:hover {
            color: #1d4ed8;
        }

/* Form Container */
.form-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}

.form-content {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.form-section {
    background: rgba(248, 250, 252, 0.5);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-icon {
    width: 20px;
    height: 20px;
    color: #3b82f6;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #1f2937;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

    .form-input::placeholder,
    .form-textarea::placeholder {
        color: #9ca3af;
    }

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        outline: none;
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        background: #ffffff;
    }

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
}

.checkbox-label {
    font-weight: 400;
    color: #6b7280;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Form Actions - CENTERED */
.form-actions {
    padding: 2rem;
    border-top: 1px solid #e5e7eb;
    background: rgba(248, 250, 252, 0.5);
    display: flex;
    gap: 1rem;
    justify-content: center; /* Changed from flex-end to center */
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    text-decoration: none;
    justify-content: center;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    }

.btn-secondary {
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

    .btn-secondary:hover {
        background: #f9fafb;
        transform: translateY(-2px);
        color: #374151;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

    .btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    }


.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

    .btn-danger:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
    }


/* Upload Area */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: rgba(248, 250, 252, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

    .upload-area:hover {
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.02);
    }

    .upload-area.dragover {
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.05);
        transform: scale(1.02);
    }

.upload-icon {
    font-size: 48px;
    color: #9ca3af;
    margin: 0 auto 1rem;
}

.upload-text {
    color: #6b7280;
    font-size: 0.875rem;
}

    .upload-text strong {
        color: #3b82f6;
        cursor: pointer;
    }

.file-input {
    display: none;
}

/* Preview Image */
.image-preview {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        z-index: 999;
        height: 100vh;
    }

        .sidebar.open {
            left: 0;
        }

    .main-content {
        padding: 1rem;
    }

    .header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Success Animation */
.success-animation {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid #bbf7d0;
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.2);
    text-align: center;
    z-index: 1000;
    animation: successBounce 0.6s ease-out;
}

@keyframes successBounce {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.success-icon {
    font-size: 64px;
    color: #10b981;
    margin: 0 auto 1rem;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #065f46;
    margin-bottom: 0.5rem;
}

.success-message {
    color: #047857;
    font-size: 0.875rem;
}

/* Data Table */
.data-section {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.data-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}


.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table th,
    .data-table td {
        padding: 1rem 1.5rem;
        text-align: left;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    }

    .data-table th {
        background: rgba(241, 245, 249, 0.7);
        font-weight: 600;
        color: #475569;
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .data-table tr {
        transition: all 0.2s ease;
    }

    .data-table tbody tr:hover {
        background: rgba(59, 130, 246, 0.05);
        transform: scale(1.001);
    }

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-active {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

    .btn-edit:hover {
        background: rgba(59, 130, 246, 0.25);
        transform: scale(1.1);
    }

.btn-delete {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

    .btn-delete:hover {
        background: rgba(239, 68, 68, 0.25);
        transform: scale(1.1);
    }

/* User Details Container */
.details-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    animation: slideInUp 0.5s ease-out;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.details-header {
    padding: 2rem;
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.details-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.details-subtitle {
    color: #6b7280;
    font-size: 0.875rem;
}


.details-content {
    padding: 2rem;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.details-section {
    background: rgba(248, 250, 252, 0.5);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

/* Actions Section */
.actions-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.actions-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-group {
    margin-bottom: 1.5rem;
}

.info-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.info-value {
    color: #6b7280;
    font-size: 0.875rem;
}
