/* ============================================ */
/* ORDER HISTORY STYLES                        */
/* ============================================ */
.order-history-list {
    margin-top: 12px;
}
.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 12px;
    margin-bottom: 8px;
    transition: background 0.2s;
    border: 1px solid rgba(6, 11, 17, 0.04);
}
.order-item:hover {
    background: #f4f5f6;
}
.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}
.order-item-id {
    font-weight: 600;
    font-size: 14px;
    color: #060B11;
}
.order-item-date {
    font-size: 12px;
    color: var(--text-muted);
}
.order-item-amount {
    font-weight: 700;
    font-size: 14px;
    color: #060B11;
}
.order-item-status {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
}
.order-item-status.logged { background: #e5e7eb; color: #4b5563; }
.order-item-status.assembling { background: rgba(251, 176, 59, 0.15); color: #b45309; }
.order-item-status.out-for-delivery { background: rgba(251, 176, 59, 0.25); color: #92400e; }
.order-item-status.delivered { background: rgba(16, 185, 129, 0.15); color: #065f46; }
.order-item-status.cancelled { background: rgba(204, 31, 38, 0.1); color: #CC1F26; }

.order-empty {
    text-align: center;
    padding: 30px 0;
    color: var(--text-muted);
}
.order-empty i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    color: #CC1F26;
}

.order-view-btn {
    padding: 4px 14px;
    border-radius: 20px;
    border: 1px solid #060B11;
    background: transparent;
    color: #060B11;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}
.order-view-btn:hover {
    background: #060B11;
    color: #fff;
}

.order-history-toggle {
    cursor: pointer;
    user-select: none;
}
.order-history-toggle .chevron {
    transition: transform 0.3s;
}
.order-history-toggle.active .chevron {
    transform: rotate(180deg);
}
.order-history-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.order-history-content.open {
    max-height: 2000px;
    transition: max-height 0.5s ease-in;
}

/* ============================================ */
/* PROFILE AVATAR                              */
/* ============================================ */
.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #060B11;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(6, 11, 17, 0.1);
    overflow: hidden;
    position: relative;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-avatar-upload {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #060B11;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 10px;
    box-shadow: 0 2px 8px rgba(6, 11, 17, 0.15);
}

.profile-avatar-upload:hover {
    transform: scale(1.1);
    background: #CC1F26;
}

.profile-avatar-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* ============================================ */
/* EDIT PROFILE TOGGLE                         */
/* ============================================ */
.edit-profile-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: #ffffff;
    border-bottom: 1px solid rgba(6, 11, 17, 0.04);
    cursor: pointer;
    user-select: none;
}
.edit-profile-toggle .chevron {
    transition: transform 0.3s;
}
.edit-profile-toggle.active .chevron {
    transform: rotate(180deg);
}

.edit-profile-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #ffffff;
}
.edit-profile-content.open {
    max-height: 800px;
    transition: max-height 0.5s ease-in;
}

.edit-profile-content .form-inner {
    padding: 16px 20px 20px;
}

.edit-profile-content .form-group {
    margin-bottom: 14px;
}

.edit-profile-content .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #060B11;
    margin-bottom: 4px;
}

.edit-profile-content .form-group input,
.edit-profile-content .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(6, 11, 17, 0.1);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fafafa;
    color: #060B11;
}

.edit-profile-content .form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.edit-profile-content .form-group input:focus,
.edit-profile-content .form-group textarea:focus {
    outline: none;
    border-color: #CC1F26;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(204, 31, 38, 0.08);
}

.edit-profile-content .form-group input:disabled {
    background: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

.edit-profile-content .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.edit-profile-content .btn-save {
    flex: 1;
    padding: 10px;
    background: linear-gradient(135deg, #CC1F26, #FBB03B);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-profile-content .btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(204, 31, 38, 0.3);
}

.edit-profile-content .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.edit-profile-content .btn-cancel {
    padding: 10px 20px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.edit-profile-content .btn-cancel:hover {
    background: #e5e7eb;
}

.edit-profile-content .form-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}

.edit-profile-content .form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
}

.edit-profile-content .form-message.error {
    display: block;
    background: #fde8e8;
    color: #CC1F26;
}

.edit-profile-content .form-message.loading {
    display: block;
    background: #f3f4f6;
    color: #6b7280;
}

/* ============================================ */
/* SHIPPING ADDRESS STYLES                     */
/* ============================================ */
.shipping-address-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(6, 11, 17, 0.04);
    transition: all 0.2s;
}

.shipping-address-item.default {
    border-color: #10b981;
    background: #f0fdf4;
}

.shipping-address-item .address-info {
    flex: 1;
    font-size: 13px;
    color: #060B11;
    line-height: 1.5;
}

.shipping-address-item .address-info .default-badge {
    display: inline-block;
    background: #10b981;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 10px;
    border-radius: 12px;
    margin-left: 8px;
    text-transform: uppercase;
}

.shipping-address-item .address-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 12px;
}

.shipping-address-item .address-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    transition: all 0.2s;
    color: #6b7280;
}

.shipping-address-item .address-actions button:hover {
    background: #e5e7eb;
}

.shipping-address-item .address-actions button.set-default {
    color: #10b981;
}

.shipping-address-item .address-actions button.set-default:hover {
    background: #d1fae5;
}

.shipping-address-item .address-actions button.delete-address {
    color: #CC1F26;
}

.shipping-address-item .address-actions button.delete-address:hover {
    background: rgba(204, 31, 38, 0.1);
}

.address-empty {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.address-empty i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
    color: #CC1F26;
}

.add-address-form {
    margin-top: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px dashed rgba(6, 11, 17, 0.15);
}

.add-address-form .form-group {
    margin-bottom: 10px;
}

.add-address-form .form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #060B11;
    margin-bottom: 3px;
}

.add-address-form .form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(6, 11, 17, 0.1);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    min-height: 50px;
    background: #fff;
    color: #060B11;
    transition: border-color 0.2s;
}

.add-address-form .form-group textarea:focus {
    outline: none;
    border-color: #CC1F26;
    box-shadow: 0 0 0 3px rgba(204, 31, 38, 0.08);
}

.add-address-form .form-row {
    display: flex;
    gap: 10px;
}

.add-address-form .btn-add-address {
    padding: 8px 20px;
    background: #060B11;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-address-form .btn-add-address:hover {
    background: #1b222b;
}

.add-address-form .btn-add-address:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.add-address-form .btn-cancel-address {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.add-address-form .btn-cancel-address:hover {
    background: #e5e7eb;
}

/* ============================================ */
/* DISPATCHER LINK STYLES                      */
/* ============================================ */
.dispatcher-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(6, 11, 17, 0.03), rgba(204, 31, 38, 0.04));
    border-bottom: 1px solid rgba(6, 11, 17, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid #CC1F26;
}
.dispatcher-link:hover {
    background: linear-gradient(135deg, rgba(6, 11, 17, 0.06), rgba(204, 31, 38, 0.08));
}
.dispatcher-link span {
    font-size: 14px;
    font-weight: 600;
    color: #060B11;
}
.dispatcher-link span i {
    width: 24px;
    color: #CC1F26;
}
.dispatcher-link .chevron-right {
    color: #CC1F26;
    font-size: 14px;
}
.dispatcher-badge {
    background: #CC1F26;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 8px;
    text-transform: uppercase;
}

/* ============================================ */
/* RESPONSIVE                                  */
/* ============================================ */
@media (max-width: 480px) {
    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .order-item-info {
        width: 100%;
    }
    .order-view-btn {
        width: 100%;
        text-align: center;
    }
}
