/* Modern Pages Styles */

/* Page Layout */
.page-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page-header-modern {
    margin-bottom: 2.5rem;
}

.page-title-modern {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.page-subtitle-modern {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

.alert-modern {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.alert-modern svg {
    flex-shrink: 0;
}

/* Empty State */
.empty-state-modern {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.empty-icon-modern {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    color: #95a5a6;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 50%;
}

.empty-state-modern h2 {
    font-size: 1.5rem;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.empty-state-modern p {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.btn-modern-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Cart Modern */
.cart-modern {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.cart-items-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item-modern {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.cart-item-modern:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    min-width: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 0.5rem;
    max-width: 100%;
    max-height: 100%;
}

.cart-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name-modern {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.cart-item-price-modern {
    font-size: 0.9rem;
    color: #6c757d;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-input-modern {
    width: 70px;
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    transition: border-color 0.3s;
}

.quantity-input-modern:focus {
    outline: none;
    border-color: #667eea;
}

.quantity-unit {
    font-size: 0.85rem;
    color: #6c757d;
}

.cart-item-total-modern {
    font-size: 1.25rem;
    font-weight: 700;
    color: #27ae60;
    min-width: 120px;
    text-align: right;
}

.btn-remove-modern {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee;
    color: #e74c3c;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-remove-modern:hover {
    background: #e74c3c;
    color: white;
    transform: scale(1.1);
}

.cart-summary-modern {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card-modern {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-child {
    border-bottom: none;
}

.total-row {
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    border-top: 2px solid #e0e0e0;
}

.summary-label {
    font-size: 1rem;
    color: #6c757d;
}

.summary-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
}

.total-price-modern {
    font-size: 1.75rem;
    font-weight: 700;
    color: #27ae60;
}

.btn-checkout-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-checkout-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Checkout Modern */
.checkout-modern {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 2rem;
}

.checkout-form-section,
.checkout-summary-section {
    display: flex;
    flex-direction: column;
}

.section-card-modern {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-title-modern {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-title-modern svg {
    color: #667eea;
}

.form-modern {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group-modern label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
}

.input-modern {
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.input-modern:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-modern:disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.textarea-modern {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.order-items-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.order-item-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.order-item-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.order-item-info p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0;
}

.order-item-total-modern {
    font-size: 1.1rem;
    font-weight: 700;
    color: #27ae60;
}

.order-total-modern {
    padding-top: 1.5rem;
    border-top: 2px solid #e0e0e0;
}

.total-row-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
}

/* Orders Modern */
.orders-list-modern {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.order-card-modern {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.order-card-modern:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.order-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.order-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.order-number-modern {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.order-date-modern {
    font-size: 0.9rem;
    color: #6c757d;
}

.order-status-modern {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-confirmed {
    background: #fff3e0;
    color: #f57c00;
}

.status-delivered {
    background: #e8f5e9;
    color: #388e3c;
}

.status-cancelled {
    background: #ffebee;
    color: #d32f2f;
}

.order-details-modern {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item-modern {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.detail-item-modern svg {
    flex-shrink: 0;
    color: #667eea;
    margin-top: 0.25rem;
}

.detail-item-modern .tenge-icon {
    flex-shrink: 0;
    color: #667eea;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    margin-top: 0.15rem;
    width: 18px;
    text-align: center;
}

.detail-item-modern > div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.detail-label {
    font-size: 0.85rem;
    color: #6c757d;
    font-weight: 500;
}

.detail-value {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 500;
}

.order-items-details {
    margin-top: 1rem;
}

.order-items-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #667eea;
    list-style: none;
    transition: all 0.3s;
}

.order-items-summary:hover {
    background: #f0f0f0;
}

.order-items-summary::-webkit-details-marker {
    display: none;
}

.order-items-summary svg {
    transition: transform 0.3s;
}

.order-items-details[open] .order-items-summary svg {
    transform: rotate(180deg);
}

.order-items-table-modern {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-item-row-modern {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 0.9rem;
}

.admin-order-actions-list {
    margin-top: 1.25rem;
    display: flex;
    justify-content: flex-end;
}

.item-name-modern {
    font-weight: 600;
    color: #1a1a1a;
}

.item-quantity-modern,
.item-price-modern {
    color: #6c757d;
}

.item-total-modern {
    font-weight: 700;
    color: #27ae60;
    text-align: right;
}

.admin-products-grid {
    margin-top: 2rem;
}

.admin-product-card .product-image-container {
    height: 220px;
}

.admin-product-meta {
    margin-top: 1rem;
}

.admin-status-pill {
    margin-top: 0.75rem;
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-status-pill.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.admin-status-pill.inactive {
    background: #ffebee;
    color: #c62828;
}

.admin-card-actions {
    margin-top: 1.25rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-card-actions .btn-modern-primary,
.admin-card-actions .btn-danger {
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.admin-users-list .admin-order-actions-list {
    justify-content: flex-start;
    gap: 0.75rem;
}

/* Auth Pages */
.auth-page-modern {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container-modern {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.auth-header-modern {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title-modern {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.auth-subtitle-modern {
    font-size: 1rem;
    color: #6c757d;
    margin: 0;
}

.auth-form-modern {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.btn-auth-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-auth-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.auth-footer-modern {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #f0f0f0;
    color: #6c757d;
    font-size: 0.95rem;
}

.auth-link-modern {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.auth-link-modern:hover {
    color: #764ba2;
}

/* Responsive */
@media (max-width: 1024px) {
    .cart-modern,
    .checkout-modern {
        grid-template-columns: 1fr;
    }
    
    .cart-summary-modern {
        position: static;
    }
}

@media (max-width: 768px) {
    .page-modern {
        padding: 1rem 0.5rem;
    }
    
    .page-title-modern {
        font-size: 2rem;
    }
    
    .cart-item-modern {
        grid-template-columns: 70px 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
        min-width: 70px;
    }
    
    .cart-item-controls {
        grid-column: 1 / -1;
        justify-content: space-between;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #f0f0f0;
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .quantity-control {
        flex: 1;
        min-width: 120px;
    }
    
    .cart-item-total-modern {
        min-width: auto;
        text-align: left;
    }
    
    .order-item-row-modern {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .item-total-modern {
        text-align: left;
    }

    .admin-order-actions-list .btn-modern-primary {
        width: 100%;
        justify-content: center;
    }

    .admin-card-actions .btn-modern-primary,
    .admin-card-actions .btn-danger {
        width: 100%;
    }

    .admin-users-list .admin-order-actions-list {
        flex-direction: column;
    }
    
    .auth-container-modern {
        padding: 2rem 1.5rem;
    }
    
    .auth-title-modern {
        font-size: 1.75rem;
    }
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    color: #27ae60;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.cart-notification svg {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .page-title-modern {
        font-size: 1.75rem;
    }
    
    .section-card-modern {
        padding: 1.5rem;
    }
    
    .summary-card-modern {
        padding: 1.5rem;
    }
    
    .cart-notification {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
