/* Account Page Styles */

/* Main Layout */
.account-main {
    min-height: 100vh;
    background: #f8fafc;
    padding: 80px 0 40px;
}

.account-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.loading-state p {
    margin-top: 16px;
    font-size: 16px;
    color: #6b7280;
}

/* Account Header */
.account-header {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 32px;
    margin-bottom: 32px;
}

.account-header-content {
    display: flex;
    align-items: center;
    gap: 24px;
}

.account-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b4a, #e55a3a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    flex-shrink: 0;
}

.account-info {
    flex: 1;
}

.account-name {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.account-email {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 16px 0;
}

.account-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.account-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
}

.account-badge.loyalty {
    background: rgba(255, 193, 7, 0.1);
    color: #f59e0b;
}

.account-badge.vip {
    background: rgba(168, 85, 247, 0.1);
    color: #8b5cf6;
}

/* Account Navigation */
.account-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}

.account-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
}

.account-nav-item:hover {
    background: #f3f4f6;
    color: #374151;
}

.account-nav-item.active {
    background: #ff6b4a;
    color: white;
}

.account-nav-item i {
    font-size: 16px;
}

.nav-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

.account-nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.2);
}

/* Account Sections */
.account-sections {
    position: relative;
}

.account-section {
    display: none;
}

.account-section.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

/* Profile Section */
.profile-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.profile-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

.profile-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
}

.info-value {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

/* Orders Section */
.order-filters {
    display: flex;
    gap: 12px;
    align-items: center;
}

.order-filters select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    color: #374151;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 24px;
    transition: all 0.2s ease;
}

.order-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.order-number {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.order-date {
    font-size: 14px;
    color: #6b7280;
}

.order-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.pending {
    background: rgba(249, 115, 22, 0.1);
    color: #f59e0b;
}

.order-status.processing {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.order-status.shipped {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.order-status.delivered {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.order-status.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.order-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-items {
    font-size: 14px;
    color: #6b7280;
}

.order-total {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.order-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.order-action-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-action-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.order-action-btn.primary {
    background: #ff6b4a;
    color: white;
    border-color: #ff6b4a;
}

.order-action-btn.primary:hover {
    background: #e55a3a;
}

/* Pets Section */
.pets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.pet-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
}

.pet-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.pet-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b4a, #e55a3a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
}

.pet-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.pet-type {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
}

.pet-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.pet-action-btn {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-action-btn:hover {
    background: #f3f4f6;
}

.add-pet-card {
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-pet-card:hover {
    border-color: #ff6b4a;
    background: #fef7f5;
}

.add-pet-icon {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
}

.add-pet-card:hover .add-pet-icon {
    color: #ff6b4a;
}

.add-pet-text {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
}

/* Rewards Section */
.rewards-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.rewards-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.rewards-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b4a, #e55a3a);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.rewards-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.points-value {
    font-size: 32px;
    font-weight: 700;
    color: #ff6b4a;
    line-height: 1;
    margin-bottom: 4px;
}

.rewards-count {
    font-size: 32px;
    font-weight: 700;
    color: #10b981;
    line-height: 1;
    margin-bottom: 4px;
}

.rewards-info p {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.rewards-history {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

.rewards-history h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.rewards-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.rewards-history-item:last-child {
    border-bottom: none;
}

.rewards-history-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rewards-history-action {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.rewards-history-date {
    font-size: 12px;
    color: #6b7280;
}

.rewards-history-points {
    font-size: 14px;
    font-weight: 600;
}

.rewards-history-points.positive {
    color: #10b981;
}

.rewards-history-points.negative {
    color: #ef4444;
}

/* Settings Section */
.settings-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.settings-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

.settings-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
}

.settings-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setting-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 0;
}

.setting-option input[type="checkbox"] {
    display: none;
}

.setting-option .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.setting-option input[type="checkbox"]:checked + .checkmark {
    background: #ff6b4a;
    border-color: #ff6b4a;
}

.setting-option input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.setting-option span {
    font-size: 14px;
    color: #374151;
}

/* Not Authenticated State */
.not-authenticated {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.not-auth-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 48px;
    max-width: 400px;
}

.not-auth-content i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 24px;
}

.not-auth-content h2 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.not-auth-content p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 32px 0;
}

/* Buttons */
.btn-primary {
    background: #ff6b4a;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #e55a3a;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6b7280;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.empty-state p {
    margin: 0;
    font-size: 16px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid #f3f4f6;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 32px;
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f3f4f6;
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #1f2937;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b4a;
    box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .account-container {
        padding: 0 16px;
    }
    
    .account-header {
        padding: 24px 20px;
    }
    
    .account-header-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .account-name {
        font-size: 24px;
    }
    
    .account-nav {
        flex-direction: column;
        gap: 4px;
    }
    
    .account-nav-item {
        justify-content: center;
    }
    
    .profile-cards {
        grid-template-columns: 1fr;
    }
    
    .pets-grid {
        grid-template-columns: 1fr;
    }
    
    .rewards-overview {
        grid-template-columns: 1fr;
    }
    
    .settings-cards {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .order-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }
    
    .modal-body {
        padding: 24px 20px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .account-main {
        background: #111827;
    }
    
    .account-header,
    .profile-card,
    .order-item,
    .pet-card,
    .rewards-card,
    .rewards-history,
    .settings-card,
    .not-auth-content {
        background: #1f2937;
        border-color: #374151;
    }
    
    .account-name,
    .profile-card h3,
    .order-number,
    .pet-name,
    .rewards-info h3,
    .rewards-history h3,
    .settings-card h3,
    .not-auth-content h2 {
        color: #f9fafb;
    }
    
    .account-email,
    .info-label,
    .order-date,
    .order-items,
    .pet-type,
    .rewards-info p,
    .rewards-history-date,
    .not-auth-content p {
        color: #d1d5db;
    }
    
    .info-value,
    .order-total,
    .rewards-history-action,
    .setting-option span {
        color: #e5e7eb;
    }
}