/* Glassmorphism Variables */
:root {
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --primary-gradient: linear-gradient(135deg, #7fb8b8 0%, #5a9a9a 100%);
    --danger-color: #ff6b6b;
    --text-main: #2c3e50;
}

/* Modal Base */
.admin-modal-content,
.login-modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    padding: 3rem;
    width: 95%;
    max-width: 750px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.login-modal-content {
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
}

.delete-modal-content {
    max-width: 400px;
    text-align: center;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-left: 5px solid var(--danger-color);
}

.delete-modal-title {
    color: var(--text-main);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.delete-modal-text {
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.delete-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-danger {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.login-modal-content {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Titles */
.section-title {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* Form Styles */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-left: 5px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    padding: 14px 18px;
    border-radius: 14px;
    border: 2px solid rgba(226, 232, 240, 0.6);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    width: 100%;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    outline: none;
    border-color: #7fb8b8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(127, 184, 184, 0.15);
    transform: translateY(-2px);
}

/* Image Inputs */
.image-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease;
}

.image-input-group input {
    flex: 1;
}

.remove-image-btn {
    background: #ffe5e5;
    color: var(--danger-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.remove-image-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.small-btn {
    align-self: flex-start;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 8px;
    background: #e2e8f0;
    border: none;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
}

.small-btn:hover {
    background: #cbd5e1;
}

/* Image Preview Grid */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 15px;
    min-height: 100px;
    padding: 15px;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 12px;
    border: 2px dashed #cbd5e1;
}

.image-preview-grid img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.image-preview-grid img:hover {
    transform: scale(1.1);
}

/* Tabs */
.admin-tabs {
    background: rgba(255, 255, 255, 0.5);
    padding: 6px;
    border-radius: 14px;
    display: flex;
    gap: 5px;
    margin-bottom: 2rem;
}

.admin-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-tab.active {
    background: white;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Submit Button */
.admin-submit-btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-weight: 600;
    padding: 14px;
    font-size: 1.1rem;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 1rem;
    box-shadow: 0 10px 20px -10px rgba(90, 154, 154, 0.5);
    transition: all 0.3s ease;
}

.admin-submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -10px rgba(90, 154, 154, 0.6);
}

.admin-submit-btn:active {
    transform: translateY(-1px);
}

/* Product List Items */
.admin-product-item {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
    border: 1px solid rgba(226, 232, 240, 0.5);
    position: relative;
    overflow: hidden;
}

.admin-product-item:hover {
    transform: translateX(5px);
    border-color: #7fb8b8;
}

/* Active State for Modal */
.product-modal.active,
#login-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    pointer-events: all;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

/* Tab Content Visibility */
.admin-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin Products List Container */
.admin-products-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.admin-products-list::-webkit-scrollbar {
    width: 8px;
}

.admin-products-list::-webkit-scrollbar-track {
    background: rgba(241, 245, 249, 0.5);
    border-radius: 10px;
}

.admin-products-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.admin-products-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Empty State */
.empty-list {
    text-align: center;
    color: #94a3b8;
    font-size: 1rem;
    padding: 3rem 1rem;
    font-style: italic;
}

/* Admin Product List Item Styles */
.admin-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.admin-item-info {
    flex: 1;
    min-width: 0;
}

.admin-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-item-price {
    color: #7fb8b8;
    font-weight: 600;
    font-size: 0.95rem;
}

.admin-item-delete {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.admin-item-delete:hover {
    background: #ffe5e5;
    color: var(--danger-color);
    transform: scale(1.1);
}

.admin-item-delete:active {
    transform: scale(0.95);
}

/* Admin Item Edit Button */
.admin-item-edit {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.admin-item-edit:hover {
    background: #e5f3ff;
    color: #3b82f6;
    transform: scale(1.1);
}

.admin-item-edit:active {
    transform: scale(0.95);
}

/* Status Badges */
.admin-item-badges {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.status-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 600;
}

.coming-soon-badge {
    background: #fff4e6;
    color: #e67e22;
}

.static-badge {
    background: #e8f4f8;
    color: #3498db;
}

/* Backup Controls */
.backup-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.backup-controls .small-btn {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    font-size: 0.9rem;
}

.backup-controls .small-btn:hover {
    transform: translateY(-2px);
}

/* Row Layout Helper */
.form-group.row {
    display: flex;
    gap: 1rem;
}

.col-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Benefit Input Groups */
.benefit-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: rgba(241, 245, 249, 0.5);
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.benefit-title {
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.benefit-text {
    padding: 10px 12px;
    border-radius: 8px;
    border: 2px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    resize: vertical;
    min-height: 60px;
    transition: all 0.3s ease;
}

.benefit-title:focus,
.benefit-text:focus {
    outline: none;
    border-color: #7fb8b8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(127, 184, 184, 0.2);
}

.remove-benefit-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffe5e5;
    color: var(--danger-color);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.remove-benefit-btn:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 12px;
    background: rgba(241, 245, 249, 0.3);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: rgba(241, 245, 249, 0.6);
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #7fb8b8;
}

.checkbox-label span {
    font-size: 1rem;
    font-weight: 500;
    color: #4a5568;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-modal-content {
        padding: 1.5rem;
        max-width: 95%;
    }

    .form-group.row {
        flex-direction: column;
    }

    .admin-item-name {
        font-size: 0.9rem;
    }

    .admin-item-price {
        font-size: 0.85rem;
    }
}

/* Image Mode Toggle */
.image-mode-toggle {
    display: flex;
    gap: 5px;
    background: rgba(226, 232, 240, 0.5);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 5px;
}

.mode-option {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
}

.mode-option input[type="radio"] {
    display: none;
}

.mode-option:hover {
    background: rgba(255, 255, 255, 0.5);
}

.mode-option.active {
    background: white;
    color: #7fb8b8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-input-group {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 15px;
    background: rgba(241, 245, 249, 0.3);
    border-radius: 10px;
    margin-bottom: 15px !important;
    position: relative;
}