/* Account Pages Styles */

.account-page {
    padding: 40px 0 80px;
    min-height: calc(100vh - 80px);
    background: var(--color-background-section);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.breadcrumb a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--color-accent);
}

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

/* Sidebar */
.account-sidebar {
    background: var(--color-background-white);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
    position: sticky;
    top: 100px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border-primary);
}

.user-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-accent), #e8d5a3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.user-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-info p {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.sidebar-nav .nav-item:hover {
    background: var(--color-background-section);
    color: var(--color-accent);
}

.sidebar-nav .nav-item.active {
    background: rgba(200, 169, 106, 0.1);
    color: var(--color-accent);
}

.sidebar-nav .nav-item.logout {
    margin-top: 16px;
    color: #ef4444;
}

.sidebar-nav .nav-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

.sidebar-nav .nav-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-nav .nav-item:hover svg,
.sidebar-nav .nav-item.active svg {
    opacity: 1;
}

/* Content */
.account-content {
    background: var(--color-background-white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.content-section {
    animation: fadeIn 0.3s ease;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.section-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

/* Forms */
.profile-form,
.password-form,
.address-form {
    max-width: 600px;
}

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

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border-primary);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: var(--color-background-white);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(200, 169, 106, 0.1);
}

.form-group input[readonly] {
    background: var(--color-background-section);
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* Password Section */
.password-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--color-border-primary);
}

.password-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 24px;
}

/* Address List */
.address-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.address-card {
    background: var(--color-background-section);
    border: 1px solid var(--color-border-primary);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.address-card.default {
    border-color: var(--color-accent);
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.address-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.badge {
    background: var(--color-accent);
    color: white;
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.address-body {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.address-body p {
    margin-bottom: 4px;
}

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

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    background: var(--color-background-section);
    border: 1px solid var(--color-border-primary);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.order-card:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 20px rgba(200, 169, 106, 0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-number {
    font-weight: 600;
    font-size: 1rem;
}

.order-date {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.info {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.primary {
    background: rgba(200, 169, 106, 0.2);
    color: #8b6914;
}

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

.order-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 16px;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-item {
    display: flex;
    gap: 8px;
    font-size: 0.875rem;
}

.item-name {
    color: var(--color-text-primary);
}

.item-qty {
    color: var(--color-text-secondary);
}

.more-items {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.order-total {
    text-align: right;
}

.order-total span {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-bottom: 4px;
}

.order-total strong {
    font-size: 1.125rem;
    color: var(--color-accent);
}

.order-footer {
    display: flex;
    justify-content: flex-end;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--color-background-white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.modal-lg {
    max-width: 700px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border-primary);
}

.modal-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-text-primary);
}

.address-form {
    padding: 24px;
    max-width: none;
}

/* Order Detail */
.order-detail {
    padding: 24px;
}

.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-border-primary);
}

.order-detail-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.order-detail-header p {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.order-detail-section {
    margin-bottom: 24px;
}

.order-detail-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-secondary);
}

.order-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.order-items-table {
    width: 100%;
    border-collapse: collapse;
}

.order-items-table th,
.order-items-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--color-border-primary);
    font-size: 0.875rem;
}

.order-items-table th {
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-background-section);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.875rem;
}

.summary-row.discount {
    color: #059669;
}

.summary-row.total {
    border-top: 1px solid var(--color-border-primary);
    padding-top: 12px;
    margin-top: 8px;
}

.summary-row.total strong {
    font-size: 1.125rem;
    color: var(--color-accent);
}

.artwork-upload {
    background: var(--color-background-section);
    padding: 20px;
    border-radius: 12px;
}

.artwork-upload form {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.artwork-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.artwork-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--color-background-section);
    border-radius: 8px;
    font-size: 0.875rem;
}

.file-status {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
}

.file-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.file-status.approved {
    background: #d1fae5;
    color: #065f46;
}

.file-status.rejected {
    background: #fee2e2;
    color: #991b1b;
}

/* Empty & Error States */
.empty-state,
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-secondary);
}

.empty-state svg,
.error-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.empty-state p,
.error-state p {
    margin-bottom: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--color-text-secondary);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success {
    background: #059669;
    color: white;
}

.toast.error {
    background: #dc2626;
    color: white;
}

.toast.info {
    background: #2563eb;
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: #b8963f;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border-primary);
    color: var(--color-text-primary);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-danger {
    background: transparent;
    border: 1px solid #ef4444;
    color: #ef4444;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 900px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
    
    .account-sidebar {
        position: static;
    }
    
    .order-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .account-page {
        padding: 20px 0 60px;
    }
    
    .account-content {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .address-list {
        grid-template-columns: 1fr;
    }
    
    .order-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .order-total {
        text-align: left;
    }
}
