/* Admin Panel Styles - Updated with 2-Column Layout */

:root {
    --admin-primary: #2C5282;
    --admin-secondary: #FFAB02;
    --admin-success: #48BB78;
    --admin-warning: #ED8936;
    --admin-error: #E53E3E;
    --admin-bg: #F7FAFC;
    --admin-card: #FFFFFF;
    --admin-border: #E2E8F0;
    --admin-text: #2D3748;
    --admin-text-light: #718096;
    --admin-shadow: rgba(0, 0, 0, 0.1);
}

/* Base Styles */
body {
    background: var(--admin-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* Navigation */
.nav {
    background: var(--admin-card);
    border-bottom: 1px solid var(--admin-border);
    box-shadow: 0 2px 10px var(--admin-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-title {
    color: var(--admin-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--admin-text);
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--admin-border);
    color: var(--admin-primary);
}

.nav-link.active {
    background: var(--admin-primary);
    color: white;
}

.back-to-site {
    background: var(--admin-secondary);
    color: white !important;
    font-weight: 600;
}

.back-to-site:hover {
    background: #E69500;
}

.auth-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--admin-error);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.auth-nav-link:hover {
    background: rgba(229, 62, 62, 0.1);
}

/* Mobile Toggle - Hidden by default, shown on mobile or with 5+ features */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Show hamburger when customer has 5+ features (even on desktop) */
.nav-container.has-many-features .mobile-toggle {
    display: flex;
}

/* Show hamburger when customer has 5+ features, hide some nav links on desktop */
.nav-container.has-many-features .nav-links {
    display: flex;
}

@media (min-width: 769px) {
    .nav-container.has-many-features .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--admin-card);
        border-top: 1px solid var(--admin-border);
        box-shadow: 0 2px 10px var(--admin-shadow);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-container.has-many-features .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-container.has-many-features .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-radius: 0;
    }
}

.mobile-toggle span {
    width: 100%;
    height: 3px;
    background: var(--admin-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--admin-border);
    border-top: 4px solid var(--admin-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Not Authenticated State */
.not-auth-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

.auth-prompt {
    text-align: center;
    background: var(--admin-card);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--admin-shadow);
    max-width: 400px;
}

.auth-prompt h2 {
    color: var(--admin-primary);
    margin-bottom: 1rem;
}

.auth-btn {
    background: var(--admin-primary);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background: #1A365D;
    transform: translateY(-2px);
}

/* Main Admin Panel */
.admin-main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-panel {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Admin Header */
.admin-header {
    background: var(--admin-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.user-welcome h1 {
    color: var(--admin-primary);
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
}

.user-welcome p {
    color: var(--admin-text-light);
    margin: 0;
}

.support-badge {
    background: var(--admin-secondary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.support-badge.premium {
    background: var(--admin-success);
}

.quick-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.feature-store-btn {
    background: var(--admin-secondary);
    color: white;
}

.feature-store-btn:hover {
    background: #E69500;
    transform: translateY(-2px);
}

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

.upgrade-btn:hover {
    background: #38A169;
    transform: translateY(-2px);
}

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

.manage-btn:hover {
    background: #1A365D;
    transform: translateY(-2px);
}

/* Dashboard Grid - Updated for 2 columns */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    grid-template-areas: 
        "left-column right-column";
}

/* Left column - Profile and Support sections */
#profileSection {
    grid-area: left-column;
    grid-row: 1;
}

#supportSection {
    grid-area: left-column;
    grid-row: 2;
}

/* Right column - Feature Management section */
#featureManagementSection {
    grid-area: right-column;
    grid-row: 1 / span 2; /* Span both rows */
}

/* Admin Sections */
.admin-section {
    background: var(--admin-card);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.admin-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--admin-shadow);
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h3 {
    margin: 0;
    color: var(--admin-primary);
    font-size: 1.25rem;
}

.feature-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.feature-badge.base {
    background: var(--admin-success);
    color: white;
}

.feature-badge.premium {
    background: var(--admin-secondary);
    color: white;
}

.section-content {
    padding: 1.5rem;
}

/* Feature Management Section - Updated for simplified layout */
.features-list {
    margin-bottom: 1.5rem;
}

.no-features-message {
    text-align: center;
    color: var(--admin-text-light);
    font-style: italic;
    padding: 2rem;
    background: var(--admin-bg);
    border-radius: 8px;
    margin: 0;
}

.feature-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feature-toggle-item:hover {
    border-color: var(--admin-primary);
    background: rgba(44, 82, 130, 0.02);
}

.feature-info h4 {
    margin: 0;
    color: var(--admin-primary);
    font-size: 1.1rem;
}

/* Removed styles for description and price since they're no longer used */

/* Feature Toggle */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--admin-success);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Image Upload Component */
.image-upload-container {
    width: 100%;
}

.image-dropzone {
    position: relative;
    width: 100%;
    min-height: 200px;
    border: 2px dashed var(--admin-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.image-dropzone:hover {
    border-color: var(--admin-primary);
    background: rgba(44, 82, 130, 0.02);
}

.image-dropzone.dragover {
    border-color: var(--admin-success);
    background: rgba(72, 187, 120, 0.1);
    transform: scale(1.02);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    height: 200px;
}

.dropzone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.dropzone-text p {
    margin: 0.25rem 0;
    color: var(--admin-text);
    font-weight: 500;
}

.dropzone-subtext {
    color: var(--admin-text-light) !important;
    font-size: 0.9rem !important;
}

.browse-link {
    color: var(--admin-primary);
    text-decoration: underline;
    cursor: pointer;
}

.browse-link:hover {
    color: #1A365D;
}

.image-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 10px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview:hover .image-overlay {
    opacity: 1;
}

.image-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.change-btn:hover {
    background: #1A365D;
    transform: translateY(-2px);
}

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

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

.upload-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.progress-bar {
    width: 80%;
    height: 8px;
    background: var(--admin-border);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--admin-success);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: var(--admin-text);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Error states */
.image-dropzone.error {
    border-color: var(--admin-error);
    background: rgba(229, 62, 62, 0.05);
}

.upload-error {
    background: var(--admin-error);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
}
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--admin-text);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

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

/* Buttons */
.save-btn,
.action-btn,
.add-btn,
.test-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

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

.save-btn:hover {
    background: #38A169;
    transform: translateY(-2px);
}

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

.action-btn:hover {
    background: #1A365D;
    transform: translateY(-2px);
}

.add-btn {
    background: var(--admin-secondary);
    color: white;
}

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

.test-btn {
    background: var(--admin-warning);
    color: white;
}

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

/* Stats */
.stats-row,
.stat-row {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--admin-primary);
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--admin-text-light);
    margin-top: 0.25rem;
}

/* Feature Store Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--admin-card);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.feature-store-modal {
    max-width: 900px;
    width: 90vw;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--admin-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--admin-text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--admin-border);
    color: var(--admin-text);
}

.modal-body {
    padding: 1.5rem;
}

.store-intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 171, 2, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--admin-secondary);
}

.store-intro p {
    margin: 0;
    color: var(--admin-text);
    font-weight: 500;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.feature-card {
    border: 2px solid var(--admin-border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    border-color: var(--admin-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--admin-shadow);
}

.feature-card.purchased {
    border-color: var(--admin-success);
    background: rgba(72, 187, 120, 0.05);
}

.feature-card.purchased::before {
    content: "✅ Purchased";
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--admin-success);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.feature-card h4 {
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--admin-text-light);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.feature-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--admin-secondary);
    margin: 1rem 0;
}

.purchase-btn {
    background: var(--admin-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.purchase-btn:hover {
    background: #1A365D;
    transform: translateY(-2px);
}

.purchase-btn:disabled {
    background: var(--admin-border);
    cursor: not-allowed;
    transform: none;
}

.store-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}

.store-guarantee {
    background: rgba(72, 187, 120, 0.1);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--admin-success);
}

.store-guarantee p {
    margin: 0;
    color: var(--admin-text);
}

/* Support Options */
.support-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.support-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.support-option:hover {
    border-color: var(--admin-primary);
    background: rgba(44, 82, 130, 0.02);
}

.support-option h4 {
    margin: 0 0 0.25rem 0;
    color: var(--admin-primary);
}

.support-option p {
    margin: 0;
    color: var(--admin-text-light);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--admin-card);
        border-top: 1px solid var(--admin-border);
        box-shadow: 0 2px 10px var(--admin-shadow);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-radius: 0;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    /* Mobile: Stack all sections in single column */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        grid-template-areas: 
            "profile"
            "features"
            "support";
    }
    
    #profileSection {
        grid-area: profile;
        grid-row: auto;
    }
    
    #featureManagementSection {
        grid-area: features;
        grid-row: auto;
    }
    
    #supportSection {
        grid-area: support;
        grid-row: auto;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .user-welcome h1 {
        font-size: 1.75rem;
    }
    
    .quick-actions {
        justify-content: center;
    }
    
    .stats-row,
    .stat-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .feature-toggle-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
    }
}

@media (max-width: 480px) {
    .admin-main {
        padding: 0.5rem;
    }
    
    .admin-header {
        padding: 1rem;
    }
    
    .section-content {
        padding: 1rem;
    }
    
    .user-welcome h1 {
        font-size: 1.5rem;
    }
    
    .quick-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Feature Store Specific Styles */
.feature-store {
    max-width: 1200px;
    margin: 0 auto;
}

.store-header {
    background: var(--admin-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    margin-bottom: 2rem;
    text-align: center;
}

.store-header h1 {
    color: var(--admin-primary);
    margin: 0;
    font-size: 2.5rem;
}

/* Current Package Section */
.current-package {
    margin-bottom: 3rem;
}

.package-summary {
    background: var(--admin-card);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    padding: 2rem;
}

.package-summary h3 {
    color: var(--admin-primary);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.package-details {
    margin-bottom: 1.5rem;
}

.package-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.package-item.base {
    background: rgba(72, 187, 120, 0.1);
    border-left: 4px solid var(--admin-success);
}

.package-item.purchased {
    background: rgba(255, 171, 2, 0.1);
    border-left: 4px solid var(--admin-secondary);
}

.package-name {
    font-weight: 600;
    color: var(--admin-text);
}

.package-price {
    font-weight: bold;
    color: var(--admin-primary);
}

.package-status {
    font-size: 0.9rem;
    font-weight: 600;
}

.package-total {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: var(--admin-bg);
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Available Features Section */
.available-features {
    margin-bottom: 3rem;
}

.available-features h2 {
    color: var(--admin-primary);
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: var(--admin-card);
    border: 2px solid var(--admin-border);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    border-color: var(--admin-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--admin-shadow);
}

.feature-card.purchased {
    border-color: var(--admin-success);
    background: rgba(72, 187, 120, 0.05);
}

.feature-card.purchased::before {
    content: "✅ Purchased";
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--admin-success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.feature-card h4 {
    color: var(--admin-primary);
    margin: 0;
    font-size: 1.3rem;
    flex: 1;
    margin-right: 1rem;
}

.feature-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--admin-secondary);
}

.feature-description {
    color: var(--admin-text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.feature-help {
    position: relative;
    margin-bottom: 1.5rem;
}

.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--admin-primary);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    cursor: help;
    position: relative;
}

.help-tooltip {
    position: absolute;
    bottom: 30px;
    left: 0;
    background: var(--admin-text);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    width: 280px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    line-height: 1.4;
}

.help-icon:hover .help-tooltip {
    opacity: 1;
    visibility: visible;
}

.feature-actions {
    margin-top: auto;
}

.purchase-btn {
    width: 100%;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--admin-primary);
    color: white;
}

.purchase-btn:hover {
    background: #1A365D;
    transform: translateY(-2px);
}

.purchase-btn.purchased {
    background: var(--admin-success);
    cursor: default;
}

.purchase-btn:disabled {
    background: var(--admin-border);
    cursor: not-allowed;
    transform: none;
}

/* Store Help Section */
.store-help {
    margin-bottom: 3rem;
}

.help-card {
    background: var(--admin-card);
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    padding: 2rem;
    text-align: center;
    border-left: 4px solid var(--admin-secondary);
}

.help-card h3 {
    color: var(--admin-primary);
    margin-bottom: 1rem;
}

.help-card p {
    color: var(--admin-text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.help-btn {
    background: var(--admin-secondary);
    color: white;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Payment Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--admin-card);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h3 {
    margin: 0;
    color: var(--admin-primary);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--admin-text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: var(--admin-border);
    color: var(--admin-text);
}

.modal-body {
    padding: 1.5rem;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--admin-border);
}

.payment-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid var(--admin-primary);
    text-align: right;
    font-size: 1.2rem;
}

.modal-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.proceed-btn {
    background: var(--admin-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.proceed-btn:hover {
    background: #1A365D;
    transform: translateY(-2px);
}

.cancel-btn {
    background: white;
    color: var(--admin-text);
    border: 1px solid var(--admin-border);
    padding: 0.75rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: var(--admin-bg);
    transform: translateY(-1px);
}

/* Mobile Responsive for Store */
@media (max-width: 768px) {
    .store-header {
        padding: 1.5rem 1rem;
    }
    
    .store-header h1 {
        font-size: 2rem;
    }
    
    .package-total {
        flex-direction: row;
        gap: 0;
        text-align: center;
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .help-tooltip {
        width: 250px;
        left: -115px;
    }
    
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
}

@media (max-width: 480px) {
    .store-header {
        padding: 1.5rem 1rem;
    }
    
    .store-header h1 {
        font-size: 1.75rem;
    }
    
    .package-summary {
        padding: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .help-tooltip {
        width: 200px;
        left: -90px;
        font-size: 0.8rem;
    }
}