/* account.css */

.account-main {
    flex-grow: 1;
    padding: 60px 0;
    background-color: #1a1a2e;
}

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Sidebar */
.account-sidebar {
    background-color: #20203a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 15px;
    padding: 30px;
    position: sticky;
    top: 100px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.user-profile {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
    margin-bottom: 25px;
}

.avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8a2be2, #4c00a0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(138, 43, 226, 0.4);
}

.avatar i {
    font-size: 2.5rem;
    color: white;
}

.user-profile h3 {
    color: #f0f0f0;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.user-profile p {
    color: #c0c0c0;
    font-size: 0.9rem;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: none;
    border: none;
    border-radius: 10px;
    color: #c0c0c0;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.nav-item i {
    font-size: 1.1rem;
}

.nav-item:hover {
    background-color: #2c2c4a;
    color: #f0f0f0;
}

.nav-item.active {
    background-color: #8a2be2;
    color: white;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.4);
}

.nav-item.logout-btn {
    margin-top: 15px;
    border-top: 1px solid rgba(138, 43, 226, 0.2);
    padding-top: 20px;
    color: #e74c3c;
}

.nav-item.logout-btn:hover {
    background-color: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

/* Content Area */
.account-content {
    background-color: #20203a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 15px;
    padding: 40px;
    min-height: 600px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

.content-section h2 {
    color: #f0f0f0;
    font-size: 2.2rem;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(138, 43, 226, 0.3);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8a2be2, #4c00a0);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 1.8rem;
    color: white;
}

.stat-info h3 {
    font-size: 2rem;
    color: #8a2be2;
    margin: 0;
    line-height: 1;
}

.stat-info p {
    color: #c0c0c0;
    font-size: 0.9rem;
    margin: 5px 0 0;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h3 {
    color: #f0f0f0;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.action-card {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
}

.action-card i {
    font-size: 2.5rem;
    color: #8a2be2;
}

.action-card span {
    color: #f0f0f0;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

.action-card:hover {
    background-color: #3a3a5a;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(138, 43, 226, 0.3);
}

/* Recent Orders */
.recent-orders h3 {
    color: #f0f0f0;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

/* Orders List */
.orders-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 10px 20px;
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 25px;
    color: #c0c0c0;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background-color: #3a3a5a;
    color: #f0f0f0;
}

.filter-btn.active {
    background-color: #8a2be2;
    color: white;
    border-color: #8a2be2;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
}

.order-number {
    color: #8a2be2;
    font-size: 1.2rem;
    font-weight: 700;
}

.order-date {
    color: #c0c0c0;
    font-size: 0.9rem;
}

.order-body {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.order-image {
    width: 100px;
    height: 100px;
    background-color: #20203a;
    border: 1px solid rgba(138, 43, 226, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.order-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
}

.order-details {
    flex: 1;
}

.order-details h4 {
    color: #f0f0f0;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.order-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    color: #c0c0c0;
    font-size: 0.85rem;
}

.order-specs span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.order-status {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-processing {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid #ff9800;
}

.status-shipped {
    background-color: rgba(33, 150, 243, 0.2);
    color: #2196f3;
    border: 1px solid #2196f3;
}

.status-delivered {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.status-cancelled {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
}

.order-actions {
    display: flex;
    gap: 10px;
}

.order-actions button {
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.btn-view {
    background-color: #8a2be2;
    color: white;
}

.btn-view:hover {
    background-color: #a052ee;
}

.btn-review {
    background-color: #2c2c4a;
    color: #f0f0f0;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.btn-review:hover {
    background-color: #3a3a5a;
}

.btn-track {
    background-color: #2c2c4a;
    color: #f0f0f0;
    border: 1px solid rgba(138, 43, 226, 0.3);
}

.btn-track:hover {
    background-color: #3a3a5a;
}

/* Form Sections */
.profile-form, .form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #f0f0f0;
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #c0c0c0;
    font-size: 0.95rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #4a4a6a;
    border-radius: 8px;
    background-color: #2c2c4a;
    color: #e0e0e0;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #8a2be2;
    outline: none;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.3);
}

/* Addresses Grid */
.addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.address-card {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    padding: 20px;
    position: relative;
}

.address-card.default {
    border-color: #8a2be2;
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
}

.address-label {
    color: #8a2be2;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.address-text {
    color: #c0c0c0;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.address-actions {
    display: flex;
    gap: 10px;
}

.address-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.btn-edit {
    background-color: #8a2be2;
    color: white;
}

.btn-edit:hover {
    background-color: #a052ee;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
}

/* Payment Methods Grid */
.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.payment-card {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 12px;
    padding: 25px;
    position: relative;
}

.payment-card.default {
    border-color: #8a2be2;
    box-shadow: 0 0 0 2px rgba(138, 43, 226, 0.2);
}

.card-type {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.card-type i {
    font-size: 2rem;
    color: #8a2be2;
}

.card-type span {
    color: #f0f0f0;
    font-weight: 600;
    font-size: 1.1rem;
}

.card-number {
    color: #c0c0c0;
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.card-expiry {
    color: #c0c0c0;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.payment-card .address-actions {
    margin-top: 15px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #20203a;
    border: 2px solid #8a2be2;
    border-radius: 15px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid rgba(138, 43, 226, 0.3);
}

.modal-header h2 {
    color: #f0f0f0;
    font-size: 1.8rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #c0c0c0;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #e74c3c;
}

.modal-body {
    padding: 30px;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.star-rating i {
    font-size: 2rem;
    color: #4a4a6a;
    cursor: pointer;
    transition: all 0.3s ease;
}

.star-rating i:hover,
.star-rating i.active {
    color: #ffd700;
    transform: scale(1.1);
}

/* Review Product Info */
.review-product-info {
    background-color: #2c2c4a;
    border: 1px solid rgba(138, 43, 226, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.review-product-info img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.review-product-info div {
    flex: 1;
}

.review-product-info h4 {
    color: #f0f0f0;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.review-product-info p {
    color: #c0c0c0;
    font-size: 0.9rem;
    margin: 0;
}

/* Order Details Modal Content */
.order-timeline {
    margin: 30px 0;
}

.timeline-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 40px;
    width: 2px;
    height: calc(100% - 20px);
    background: linear-gradient(to bottom, #8a2be2, transparent);
}

.timeline-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8a2be2, #4c00a0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.timeline-icon i {
    color: white;
    font-size: 1.1rem;
}

.timeline-content {
    flex: 1;
}

.timeline-content h4 {
    color: #f0f0f0;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.timeline-content p {
    color: #c0c0c0;
    font-size: 0.9rem;
    margin: 0;
}

.timeline-date {
    color: #8a2be2;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .account-layout {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .account-content {
        padding: 30px 20px;
    }

    .content-section h2 {
        font-size: 1.8rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .order-body {
        flex-direction: column;
    }

    .order-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-actions {
        width: 100%;
    }

    .order-actions button {
        flex: 1;
    }

    .addresses-grid,
    .payment-methods-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 100%;
    }

    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .account-main {
        padding: 40px 0;
    }

    .account-sidebar {
        padding: 20px;
    }

    .avatar {
        width: 60px;
        height: 60px;
    }

    .avatar i {
        font-size: 2rem;
    }

    .nav-item {
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .orders-filters {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}
